Comment on Local homeserver suddenly not responsive to SSH but can be pinged
confusedpuppy@lemmy.dbzer0.com 2 weeks ago
It sounds to me like ssdh may have stopped working. That may explain why you can’t ssh into your server but pings still respond. I have a Raspberry Pi4 and a Pi5 and have had similar issues in the past.
I would probably approach this issue by writing a small script that checks every so often if the process sshd is still alive and if not restart sshd. Maybe SystemD can so something similar but I am not familiar with SystemD.
Thanks, I’ll try this. What speaks against this is that all my services turn unreachable, and those do not rely on ssh access. But still worth a try.
confusedpuppy@lemmy.dbzer0.com 2 weeks ago
Aah you did mention that, my eyes just decided to skip that when I read your post.
This reminds me of another issue I ran into but I use Alpine Linux so I don’t know if it’s a distribution specific issue. I’ll share the issue and workaround solution anyways as something to consider.
Networking on Alpine Linux is controlled by a process called
networkingand for reasons I don’t understand and can’t see by any logs, it just stops working. I can’t ssh or access the reverse proxy port. I don’t remember if ping was working or not as it’s been a while since I dealt with it now.My work around was to have a script on my server ping a known location and restart
networkingif it couldn’t ping out. If a second ping after restarting the process failed, it would then restart the device. This script would run every 15 minutes.It’s a bandage solution that doesn’t solve the problem but it does keep my server running. However it seems like pings still work with your server so you might need to get creative in how you test your server’s connectivity.