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 drop index and before dropping it how to get the DDL.

PRVG-11250 : The check "RPM Package Manager database" was not performed because

ORA-00257:archiver error, connect internal only until freed

Verifying Daemon “Avahi-Daemon” Not Configured And Running …FAILED (PRVG-1360)

Linux OL7/RHEL7: PRVE-0421 : No entry exists in /etc/fstab for mounting /dev/shm

SKIP DNS RESLOV.CONF CHECK DURING RAC CONFIGURATION

CPU Patch Analysis

How to write to a CSV file using Oracle SQL*Plus

How to troubleshoot Long Running Concurrent Request in EBS 12.2

How To Manage Space of The FRA in the Oracle DB