SSH access to my Home Assistant node is probably the addon I spent most time on struggling. But I finally made it work.
If you are not familiar with Linux much (and I am with you here) all this SSH things can become complicated and frustrating to say the least.
Not let’s see if I can help you here.
First you need to be sure you are in Advanced Mode (click on your username in de left down and turn it on if it isn’t).
Now click on Supervisor and in the next screen on Add-on store. Here you do a search on SSH. Click on the one with the red arrow and install it. This can take up to 2 minutes. Patience remember.
Now since I am on a Mac I am going to show you exactly what I did.
Windows users. Read this part and if you don’t know what to do with SSH keys in Putty there are plenty of videos to help.
On a Mac open Terminal.app (use cmd+space and type terminal), I am going to use $ as my prompt. Remember, commands are case sensitive!! Don’t type # and everything behind it. I am using # as comment separator.
$ ssh-keygen – R homeassistant.local #get rid of any old keys
#this should output something like this;
I have left the passphrase empty, simply press return twice!
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/Bart/.ssh/id_rsa):
/Users/Bart/.ssh/id_rsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/Bart/.ssh/id_rsa.
Your public key has been saved in /Users/Bart/.ssh/id_rsa.pub.
The key fingerprint is:
and there will be more but that’s not important
Now we use
$ pbcopy < id_rsa.pub
We copy the contents of the file to our clipboard.
Now we head back to our HA addon
Ok, change username to root.
Place your cursor between the  and paste.
You should now have something that looks like the image on the right.
Check the second picture if the port is set to 22
Now go to the top, click info and in the next screen change the slider next to Show in sidebar and click Start. You can check the log file in the Log part of the menu. If there are no errors you can go back to your terminal session and do
$ ssh email@example.com
And I am in! You can now start using things locally.
Hope you got it working!
If for example you need to copy a file from in my case a Macbook to RP this is the command;
scp a.a firstname.lastname@example.org:config
It copies the file a.a to the RP in the config folder. This comes in handy if you flashed a new version of HA on a card and want to restore a previous download snapshot. I will be doein a page on snapshots soon.