Ssh: connect to host hassio.local port 22: Connection refused

Not the best add-on day for me. I’ve installed SSH & Web Terminal. Got the SSH half working with putty, web UI gives me this:

hassnuc:7681. SSL received a record that exceeded the maximum permissible length. Error code: SSL_ERROR_RX_RECORD_TOO_LONG

ssl is false.

hassbian is so much easier. hassio is incomprehensible.

2 Likes

This!
I’m noob and this was frustrating the heck out of me.
I kept getting the following error using “hassio.local” in puTTY.

“No supported authentication methods available (server sent: publickey)”

I just assumed since I was getting a response it was a key issue, and must have reset my keys and reset my settings a dozen times.

After a frustratingly long time I pulled up the puTTY event log.
image

A quick whois search of the IP address in the logs showed puTTY was connecting to some random address in Denver. I switched puTTY to the local IP address and it connected right up.

Check this post:

How can I go back to the old version SSH addon? Whit the old version I have no problems to connect trough SSH with putty or linux terminal. With this new version I can only use the webterminal, it’s not an improvement.

Did you read the README on hassio-addons/ssh at master ?

Network

To enable ssh access via the network, you need to enter the port number ‘22’ or the port you want to use. This will map that port from the hassio host into the running “Terminal & SSH” container.

In the Network section you need to specify which port your host (the machine running hassio) should map to the 22 internally in the container.

If not specified, no port is accessible from outside.

1 Like

Hello everyone, I had spent two days to solve problems to connect by ssh. I have Home Assistant 0.112.4 and installed ‘Terminal & ssh’ addon through add-ob-store.
I had filled config with my data as describe in docs - fill th username, password, generate and put rsa- key.
What were undeclared in docs:

  1. At configuration page in ‘Network settings’ need to set port 22 at field ‘Host’
  2. Don’t use YOUR username at least for first time when you will try to login. I guess that this user are not exists in your system - you have to create user with that name first. So, first time you can login by ssh with ‘root’ and your pass from configuration.
  3. Don’t spend your time for filling and using rsa-key. You can leave key empty - ‘authorized_keys: []’. In this case addon will automaticaly generate rsa-key, so when you will login first time - you will see a prompt to accept new rsa-keys from your server - just accept it.
  4. When you login as root onto your server then you can create your user (using useradd) and then use your username.
1 Like