Hi guys,
I have successfully created my SSH keys for the SSH add-on for HASS.io and it works great as long as I don’t break HASS.
But now I am having some typical noob issues, due to breaking HASS with a bad configs. (BTW, the built in configuration checker is returning ‘valid’ to configs that break HASS. But that’s another post for later.)
If I have a bad config, or worse still a ‘valid’ config (see above) that isn’t valid and I reboot HASS, I will lose SSH access. I get ssh: connect to host hassio.local port 22: No route to host
when I try to connect again, presumably because HASS never comes back up.
In the situation outlined above, without SSH access to the host’s SSH server, the only recourse I have is to reboot the whole RPi3, which gives me SSH access to HASS again. Then I can check the/config/home-assistant.log
and find out what the issue was, fix it and get it working again. But I’m breaking it constantly while I’m learning and tweaking so SSH access to the host is required.
I have been trying in vain to join together the various bits of information for creating SSH keys and I haven’t had any luck so far.
What I understand is, I need to put my public SSH key into a file called authorized_keys
and put that file in the root of the SD card. What would be helpful is an example of what the contents of a valid authorized_keys
file looks like and how I am supposed to get that file to the root of the SD card.
I am trying to use the same public key that I created when I setup the SSH add-on for the first time. I have just renamed that *.pub file to authorized_keys
and copied it to the root of the SD card when I load the SD card in my MacBook. Mainly because I don’t know if any other way of getting files on the the SD card without SSH access. But I’m thinking this isn’t the root of the SD card that the docs are talking about? e.g. the list of the files in folders I can see when its loaded in my Mac is nothing like a Unix root folder structure.
SO, how pray tell, do I get this SSH key into the host OS so I can SSH into it if I can’t SSH into it? What am I doing wrong?
Thanks in advance?