Ssh server connection refused with authorized_keys set

Background:
I have three machines I used in my home which all have different ssh keys generated for various reasons. I have added one of them to the authorized_key config in the ha ssh config site (hassio.local). When I start the ssh server, it hangs and I get connection refused. After a short time, I eventually find the ssh server did not start. I do not get any output in the Log section of the page.

Password authentication works when I remove the auth key, and set a password. When I do that, I sometimes get an error that /root/.ssh/authorized_keys does not exist. I manually tried to add it myself by creating the file and adding my key. Still it does not work.

So two questions:

  1. I’m on a mac, and with multiple keys, how do I get this to work. I’m copying the contents of .ssh/id_rsa.pub as the key. Each one has its own alias per machine due to logins I use.
  2. Once I get this working, is there a way to create another use and grant it sudo? I’d prefer to not have root exposed.

v5.5 of the SSH add-on is broken. Looks like they release a v5.6 to address it, but the build is stuck. @Frenck is working on it.

Here’s the issue on github:
[https://github.com/home-assistant/hassio-addons/issues/599]

Looks like the v5.6 of the SSH add-on is now live. I can confirm it’s working for me now.

1 Like