ssh: connect to host port 22: No route to host
you have a connectivity problem that is why you get the message "Destination Host Unreachable". Also the message "no route to host" points to the same problem, you internet connectivity. ping google.com or 8.8.8.8 to make sure your connectivity is Ok, if it works then you can check your friend's IP address is Ok or whether ssh connectivity is allowed on port 22 of his device. That is the little I know, hope it helps in finding a solution
Related videos on Youtube
PetarM
Updated on September 18, 2022Comments
-
PetarM over 1 year
Hope you are doing well today!
I started using Linux a few months ago and am pretty much new into Linux and networking.
I am using Ubuntu 20.04 2.0 LTS and installed kubuntu on a friend of mine a couple of weeks ago.
I was with 20.04 recently but decided to upgrade to 2.0. My SSH was working just perfect before upgrading the distro, but now it's not connecting anymore.
I was able to connect from my phone to my laptop with SSH before, but not anymore. I also cannot connect from my laptop to other devices using SSH. My friend and I want me to get into his server using SSH, but when I try to connect to him, I receive the following as an output: ssh: connect to host port 22: No route to host
After receiving the error above, I tried to ping his network just to make sure it's working and received the following after pinging: Destination Host Unreachable
Is the issue on my side or does he need to do any configs on his side?
Any assistance would be appreciated!
Thank you for your time!
-
user535733 about 3 yearsIn your question, show an attempt to ping a known good address, like 1.1.1.1
-
PetarM about 3 years@user535733 yes, it's pinging. I can ping my network as well
-
PetarM about 3 yearsbut can't ssh be used between external networks?
-
steeldriver about 3 yearsSSH can be used between external networks if there's a route between them - in particular, if your friend's server is behind a NAT router, then you must use their router's public IP as the destination address, and they must forward a port for SSH across the router.
-
-
PetarM about 3 yearsThank you all for the time and effort given to me! As well as for the detailed explanation. I have a couple of questions if may I ask. How can I connect to another port, but not 22 with SSH? Also, what is the difference between the LAN and WAN IPs? I mean, when and why one of the two should be used? I apologize for asking, but am pretty new into networking and still googling a lot of stuff and is a mess tbh
-
PetarM about 3 yearsThank you very much for clearing things out!