« ssh: connect to host pi port 22: No route to host » on raspberry pi
I’m sharing this solution because I’ve scratched my head so much, I guess I can’t be the only one, especially now that the Raspebrry pi has reached the 3,000,000 landmark!
My raspberry pi connected to my home WiFi using a USB dongle purchased Adafruit. Since it’s been set up, I struggle to connect to it :
jc@laptop ~ $ ssh jc@pi ssh: connect to host pi port 22: No route to host jc@laptop ~ $ ssh jc@pi ssh: connect to host pi port 22: No route to host jc@laptop ~ $ ssh jc@pi ssh: connect to host pi port 22: No route to host jc@laptop ~ $ ssh jc@pi ssh: connect to host pi port 22: No route to host jc@laptop ~ $ ssh jc@pi ssh: connect to host pi port 22: No route to host jc@laptop ~ $ ssh jc@pi ssh: connect to host pi port 22: No route to host jc@laptop ~ $ ssh jc@pi ssh: connect to host pi port 22: No route to host
…but randomly it worked…
jc@laptop ~ $ ssh jc@pi jc@pi's password:
I’ve tried various things from forums, but what actually solved the issue was to change the USB-microUSB cable I use to power the pi. It was not the power adapter itself, just the cable.
I have the same problem on 2 raspberry Pi, both connected via WiFi. But also with another cables or adapters, the problem is still there, nothing changes.
My experience with WiFi on a raspebby pi which is always on is not very good : I’ve tried many configurations, latest Raspbian patches, etc., but the network always ended up hanging after a couple of days. Since I swithed to Ethernet, the pi is rock solid (uptime says 22 days)
Wow – this worked for me. I had the USB dongle connected through my monitor’s USB port. Connected directly to the pi, it works.
Thanks!
Thanks for sharing this. We are not used to this kind of sensitivity on modern PCs, but it seems that any voltage drops may affect the Pi’s stability.
Thanks for the guide, I have the exact same problem. I have tried to solve whole day by changing /etc/network/interfaces but finally saw your post. Change to a shorter USB cable and it is solved.
I purchased a raspberry pi last week and had this error often. Turned out the solution was the same as you had found: replacing the charger. First I had a cheap one I bought on a Chinese website, and now I use my phone charger, it makes a big difference.
Thank you for sharing your experience. Interestingly, in my case it was not even the charger, but the cable itself! It seems that power supply is a critical piece of the system stability for the Pi.