I have been playing with openHAB for a few months now.
openHABian is installed on a RPi 3, connected via WiFi.
So far, everything seemed stable, I added all my personal belongings (Tradfri bulbs, shutters, Logitech Harmony, prescence detection etc …) and created many rules.
This morning, nothing lights up as usual, so,
I try to connect to my open-habian server using putty I have this message “connection trimed out”, and nothing … no access,
I check the prescence of my raspberry on the network, I see it, the IP is good,
I connect on myopenhab.org I see my server (same in android phone)
-I try to unplug the power and do a “hard reboot”, still no access after several attempts.
-I do not have access to the different logs either.
-i try to connect it to ethernet and still no access
What do you think the problem is, can we solve it, can we make a backup before possibly reinstalling everything?
Not enabled, actually running? Enabled just means that it is supposed to start when the system starts. Running means it’s actually actively running. The fact that your ssh attempts are timing out implies that the daemon is not running.
sudo systemctl status sshd
should return something like this
● ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2019-02-08 10:38:23 MST; 2 weeks 6 days ago
Main PID: 15420 (sshd)
Tasks: 1 (limit: 4915)
CGroup: /system.slice/ssh.service
└─15420 /usr/sbin/sshd -D
Mar 01 08:54:34 argus sshd[2504]: Disconnected from invalid user zhua 2.32.86.50 port 39357 [preauth]
Mar 01 08:54:51 argus sshd[2759]: Invalid user danny from 178.128.201.224 port 37316
Mar 01 08:54:51 argus sshd[2759]: Received disconnect from 178.128.201.224 port 37316:11: Bye Bye [preauth]
Mar 01 08:54:51 argus sshd[2759]: Disconnected from invalid user danny 178.128.201.224 port 37316 [preauth]
Mar 01 08:54:58 argus sshd[2874]: Invalid user yp from 210.13.102.89 port 46650
Mar 01 08:54:58 argus sshd[2874]: Received disconnect from 210.13.102.89 port 46650:11: Bye Bye [preauth]
Mar 01 08:54:58 argus sshd[2874]: Disconnected from invalid user yp 210.13.102.89 port 46650 [preauth]
Mar 01 08:55:12 argus sshd[3093]: Invalid user tr from 92.62.131.113 port 50754
Mar 01 08:55:12 argus sshd[3093]: Received disconnect from 92.62.131.113 port 50754:11: Bye Bye [preauth]
Mar 01 08:55:12 argus sshd[3093]: Disconnected from invalid user tr 92.62.131.113 port 50754 [preauth]
Notice where it says Active: (running). If it says anything else sshd is not running.
This is my ssh that is port forwarded so you can see how anything that is exposed to the Internet is under constant attack with the log statements below the header info. I need to re-enable fail2ban on this machine.
It definitely looks like your sshd is either gone or pretty broken. You can reinstall it but one has to ask why/how it became in this state. One thing to note is pulling the power on a machine that happens to be writing to any sort of flash memory can cause widespread corruption of files, including files that are not actively being written. That could be the case here, but I doubt it. This looks like sshd was uninstalled.
Were you using DHCP to get an IP address? If so, you need dhcpcd.
If you’ve disabled dhcpcd you won’t get an IP address and won’t be able to connect.
Check to see what your IP address is. Run “ip address” and look for the wlan block, and find the inet address. If it starts with 169.254 then you don’t have a valid IP, and the dhcpcd needs to work.
dhcpd is the DHCP server that hands out IP addresses to other hosts. You likely don’t need it.
dhcpcd is the DHCP Client Daemon which gets you an IP address from your DHCP server. You probably need it.
Try systemctl start dhcpcd and then journalctl -u dhcpcd.service to see what errors are happening. Once you get that sorted you should have a workable IP address again.
If you’ve assigned a fixed IP address on the host, all this isn’t helping, and I don’t know why you can’t ssh to your host.