Hi,
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.
Mirko
No.
There is no such file as ssh in the root folder.
There are several options why sshing would fail.
sshd stopped (this is the ssh daemon which provides ssh to the clients)
- 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)
- disabled login via password (you then would have to use your private key instead)
- deleted or corrupted files (
/home/<user>/.ssh/authorized_keys, /etc/shadow), though this is very unlikely to happen
I also faced the SSH connection refused error on port 22 after months of everything working fine. In my case, the SSH service (sshd) had stopped or failed to start. Since SSH wasn’t accessible, I connected a monitor and keyboard to the device, logged in locally, and used sudo systemctl restart ssh to bring it back. Make sure the firewall isn’t blocking port 22 and that the SSH service is enabled on boot. After that, SSH worked again without issues. SSH is a method of securely getting access to the remote device or server over an insecure network usually over the internet.
I hope it helps!