SSH "connection refused" months after successful installation?


I setup openhabian beginning this year and the system was and is running quiet smoothly.

Now I wanted to update my system to Openhab 2.3 and therefore tried to connect via SSH (which I did successful earlier this year) but get a “port 22: connection refused”.

If I see this right, I would be getting the same error if no file “ssh” is placed in the root folder. I’ve no idea, how the file could have gone missing.

Is there any “safe” way to shutdown openhabian, when ssh is not possible?
Any other idea how to re-enable ssh access?

Thanks a lot for your kind help in advance.


There is no such file as ssh in the root folder.

There are several options why sshing would fail.

  1. sshd stopped (this is the ssh daemon which provides ssh to the clients)
  2. trying to login as root with password (this is disabled for security reasons - instead try login as user openhabian and use su to become root - or better use sudo for each command)
  3. disabled login via password (you then would have to use your private key instead)
  4. deleted or corrupted files (/home/<user>/.ssh/authorized_keys, /etc/shadow), though this is very unlikely to happen