How To Fix No route to host SSH Error In Linux [solved]
If you are having errors like ssh: connect to host: No route to host then this tutorial post is for you as we are going to show you the fix for the no route to host ssh error in Linux.
How To Fix No route to host SSH Error In Linux
First, let’s discuss the various reason for this error in Linux. One of the most common reasons for the error “no route to host ssh error in Linux” is ping error as the remote server could be down. You can confirm it with the ping command:
Ping 192.168.1.100
If you can see the packets being sent then ping is not the issue for this error. Another reason can be the firewall rules as the firewall might block the port like 22. Run the following command to configure the firewall configuration to allow port 22.
sudo ufw allow 22/tcp sudo ufw reload
There is another command too:
firewall-cmd --permanent --add-port=22/tcp firewall-cmd --reload
Now to check if everything is fine, you need to re-connect to the remote server more via SSH.
$ ssh [email protected]
Now, you might have a solution for the error “no route to host ssh error in Linux”.
Meanwhile, you can check our useful resources:
How To Backup Ext2, Ext3, or Ext4 File Systems In Linux [Updated]
Add Apt Repository In Ubuntu 22.04 LTS: Fix add-apt-repository command not found
Let us know if you have suggestions or any alternative method to fix “No route to host SSH Error In Linux”.