Ssh Connection refused

Probably not related to the addon indeed, just to HA in general. I always do config checks as I’m paranoid about those thing. HA has taught me just that.

Which version of HA? Not sure if 106 has it but 107 (now in beta) has a safe mode to stop a config change killing your system…

Running 105.2 over here as continuous updating produced more issues than it solved - so I adapted my update policy

Yeah safe mode is in 0.106…

I was able to regain access via SSH by doing what others recommended above. I will say that it’s important that updates do not risk locking users out of their setups. This nearly happened to me, as I couldn’t access the web interface and soon discovered that SSH was no longer working after an update.

thank you to share your solution!
I fixed it with port 22 ad everything was ok!

Running 0.108.9 of hassio. Two issues:

If I use the Brave browser, the WebUI fails in the default configuration, resulting in a black window. To get it to work, I have to enable “Cross-site fingerprinting” which concerns me.

After making the change to add 22 to “Network” , ssh refuses to let me log giving me

Invalid user username from A.B.C.D port 59675
Connection closed by invalid user username A.B.C.D port 59675 [preauth]

My original Config was a copy of my ~/.ssh/id_rsa.pub where my id was <username>@hostname. I thought it might be a DNS issue so I changed it to <username>@IP address with no change.

One thing I notice is that although I write my Config as:

authorized_keys:
  - ssh-rsa
    MySshKey==
    [email protected]
password: ''

After I save it then do Supervisor->Terminal & SSH, the config adds 2 characters (>-) changing to:

authorized_keys:
  - >-
    ssh-rsa
    MySshKey==
    [email protected]
password: ''

Which seems wrong. Do people who has this work get the 2 extra characters? Did I mess up my formatting somehow?

Hi all,

after update to Supervisor 220 my hassio is not reachable by browser anymore. ssh and samba was enabled and working before the update. But now both are not reachable anymore (connection refused). Ping is working. Any idea how i can reach now the system to fix it?

Thanks for your help

Update: After reading the sdcard on a second system and powercycle it came back without a change. Found several supervisor errors in the systemlog (journalctl)

Hi,
how have you fixed the issue?
Did take the card out and put back but the same.

by ssh

$ ssh -v 192.168.1.99
OpenSSH_8.2p1, OpenSSL 1.1.1d  10 Sep 2019
debug1: Connecting to 192.168.1.99 [192.168.1.99] port 22.
debug1: connect to address 192.168.1.99 port 22: Connection refused
ssh: connect to host 192.168.1.99 port 22: Connection refused

and by app

net::ERR_CONNECTION_REFUSED

Regards

did change nothing, just read the ssd-card. AFter reboot it came back. Having now the same issue after hassio system update today…
Updating seems to be still an issue. Of course I have a backup, but what if the system is not coming back to a state to restore the backup. It is kind of … building up from scratch a new system for a restore. And then you are just where you have been before.

Hi,

I had a connection refused during any operation on supervisor. ha su logs, info, repair, etc. I was not able to log in with ssh while I also get connection refused. System did not came back after restart.
I had to connect HDMI and keyboard.

I did log in to console and vi the /etc/resolv.conf file - it was empty.
After hours I found some similar errors here - Name resolution problem since 0.97.2

I added nameserver ect and restarted supervisor container.
Luckly, web interface and ssh are up and I can log in, but still update is not working.

I had only 4 containers running in the beginning.

supervisor started but I get the error over and over like

“can’t install homeassistant/aarch64-hassio-cli:25 -> 500 Server error”

what do you have in your /etc/resolv.conf?

UPDATED: I ended up with HASSIO CLI issue, so I was not able to access command line after reboot. Root login didn’t work. Luckily in the meantime I did a snapshot. I installed new system and restore all except home assistant. All is fine now. - After restore I had to manually remove 2 repos which were missing config file and reinstall zigbee ect. Now the log is clean.

thanks for this, had they used proper names for these boxes I could probably have figured it out. 22 is not a “host”, it is a port number.

Just put port 22 in the Network config of the SSH addon and restarted but no luck :frowning:
WinSCP says connection refused. Im running HassOS 4.14, Home Assistant 0.116.4.

I am not sure that scp is enabled on this addon. Does ssh work?

Is this the ssh & web terminal addon?
If yes, it needs to have sftp: true and compatibility_mode: true when I first started using it. I use root as the username with a private key

1 Like

Yes it’s the SSH & Web terminal addon. I added the SFTP: true and compatibilty_mode: true to the config and restarted, but no luck.
i do notice this error in the logging though, but no idea where to set this up.

[09:25:10] FATAL: You need to setup a login!

what are your settings? (anonomise your passwords of course)

So did you setup a login user/password in the addon?

I guess I made a mistake overlooking the documentation. I added a password and now I can get in using WinSCP. Thanks David and Nick :slight_smile:

In the network dialog box for the add-on, put 22 in the field labeled host. Then restart the add-on for it to take effect.

Thanks! This needs to be more obvious, e.g mentioned on the “Info” tab.