0

I have a raspberry pi 4 running Bullseye. I was recently running three concurrent services: hamachi, openmedia vault and Tshock servers. Everything was running fine for about a month, until I just randomly lost the ability to reach the pi.

It was online, had an IP-address, and could ping websites, but my other home computers were not able to communicate with the pi and the pi couldn't communicate with them either. After a reboot, and some time passed, I was able to re-establish communication with the pi, but I'm wondering what might have caused a raspberry pi to just lose ssh capabilities like this? Have any of you seen anything like this? If possible I'd like to know something about potential causes before I resume running these servers on my pi.

Thanks in advance

3
  • 1
    You mention you are running openmedia vault, etc., and presumably these are services normally made available on the LAN (unless they are VPN only). Are these working for local systems when SSH fails? If not, SSH is a red herring here...
    – goldilocks
    Commented Aug 28, 2022 at 14:40
  • Most likely not "random" at all. As a first guess: Have you modified /etc/dhcpcd.conf? As a 2nd guess, are your /etc/hosts & /etc/hostname files configured properly?
    – Seamus
    Commented Aug 28, 2022 at 15:39
  • WheWhen I was unable to reach the pi, none of the services were working, in addition to ssh. Like goldilocks and Milliways stated, it’s likely not an issue with SSH. Unfortunately I can’t run the systemdctl command below since the problem is resolved, but I’ll definitely keep it in mind if I see this issue again.n I was unable to reach the pi, Commented Aug 29, 2022 at 18:26

1 Answer 1

5

what might cause a raspberry pi to just lose ssh capabilities like this?

You haven't actually provided evidence of that. It sounds like you have local control over the Pi (ie., a keyboard and display), so one check on this would be systemdctl status ssh.

If that is still running, most likely SSH is fine, the problem is other local systems cannot reach the Pi. A way to demonstrate that would be to ping the address/hostname you use with ssh. If that fails, it is probably because there is "no route to host". Unless you've intentionally blocked ICMP packets with a firewall, a running system will always respond to pings it receives, and the fact that they don't work means it is not just SSH that is unavailable.

While we're on that topic, you could try pinging another system from the pi. If you get a response, it is possible you will be then be able to ssh to the Pi from that system. If so, this supports my hypothesis below.

It was online, had an IP-address, and could ping websites, but my other home computers were not able to communicate with the pi and the pi couldn't communicate with them either [...] Have any of you seen anything like this?

Yes, and eventually I traced it down to what I think was an issue with DHCP leases and ARP. Basically, the router will still relay packets to the internet, but the Pi cannnot properly operate across the LAN.

My temporary solution to that is to try:

sudo systemctl stop dhcpcd
sudo rm /var/lib/dhcpcd5/*.lease 
sudo systemctl start dhcpcd

If that works, there are various things you can try in dhcpcd.conf.

If you aren't using dhcpcd, there will be some parallel methodology: Shut down your network connection, find where leases are stored, delete them, restart networking.

2
  • 1
    AFAIK OMV uses systemd-networkd NOT dhcpcd
    – Milliways
    Commented Aug 28, 2022 at 22:36
  • Thanks for the help, you're right about this not being an issue with SSH itself, since I do have direct access to the pi and was not able to ping any other machines on my network. I’ll keep the solution you provided on hand in case I run into this issue again. Commented Aug 29, 2022 at 18:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.