How to resolve “No route to host” SSH Error in Linux

 SSH is the most secure means of connecting to Linux servers remotely. And one of the common errors encountered while using SSH is the “ssh: connect to host port 22: No route to host”. In this short article, we will show how to troubleshoot and fix this error.



There are different reasons why this error appears. The first is normally that the remote server could be down, so you need to check whether it is up and running using ping

# ping 192.168.56.100
Ping Linux Server

From the result of ping , the server is up and running, that’s why it is accepting the pings. In this case, the reason for the error is something else.

If firewall is running on the remote server, it is possible that the firewall is blocking access via port 22.

Then use the firewall to open port 22 in the firewall as follows.

# firewall-cmd --permanent --add-port=22/tcp
# firewall-cmd --reload
OR
$ sudo ufw allow 22/tcp
$ sudo ufw reload 

Now try to re-connect to the remote server once more via SSH.

$ ssh root@192.168.56.100

SSH Login Successful


Comments

Popular posts from this blog

How to fix Oracle SQL Developer connection issue "Got minus one from a read call"

How to troubleshoot Long Running Concurrent Request in EBS 12.2

How to autopopulate user_guid in fnd_user table ( EBS Blank Page)