I'm trying to ssh into a server and get the following error ssh: connect to host server.mylan.lan port 22: No route to host
The strange thing is it was working and then suddenly no more, is this common, the server is running Centos 5.2
I'm trying to ssh into a server and get the following error ssh: connect to host server.mylan.lan port 22: No route to host
The strange thing is it was working and then suddenly no more, is this common, the server is running Centos 5.2
on the server check:
service sshd status
iptables -L
if port 22 is open and the service is running, you have a network issue
I concur with sybreon and lg. This is a network issue not an ssh issue. 'No route to host' indicates that the client machine cannot make an intial network connection to the server.
Either 'server.mylan.lan' no longer resolves to your server's IP address or a critical part of infrastructure is down making your subnet unavailable, or the server is switched off maybe??
This is not an SSH problem but a networking one. You may want to check your networking settings particularly your gateway. Try pinging server.mylan.lan
to see if you can even ping the machine.
Chances are you won't be able to. Then check your route
# route -n
# traceroute server.mylan.lan
And see what happens. Something probably changed in the networking between you and the server. Maybe a new router was installed or maybe the firewall rules changed in between.
If you are on the same subnet of the server you're trying to ssh to, then it's probably a DNS or IPtables related issue.
"No route to host" means you cannot get the server address at all, not just the ssh service.
Try checking iptables rules on the server (if you can plug a monitor and a keyboard into it of course).
Check the output of
# dig server.mylan.lan
Try pinging its hostname and/or its ip address.
If your server is on a different network, check all the above AND the routing tables.
# traceroute server.mylan.lan
could be useful as well.