Monday, May 6, 2013

ssh: connect to host port 22: No route to host

I had this error after i had implemented ssh rsa password less authentication( refer my next post for steps to implement ssh rsa password less authentication).

[oracle@homeserver1 .ssh]$ ssh oracle@homeserver2
ssh: connect to host homeserver2 port 22: No route to host

I had firewall enabled which had restriction to port 22 on server homeserver2.

Below are the commands to check the status and turn off firewall.

[root@homeserver2 ~]# /sbin/service iptables stop
Flushing firewall rules:                                   [  OK  ]
Setting chains to policy ACCEPT: filter                    [  OK  ]
Unloading iptables modules:                                [  OK  ]
[root@homeserver2 ~]# /sbin/service iptables status
Firewall is stopped.

After which i was able ssh to my remote server homeserver2 from homeserver1 successfully.

[oracle@homeserver1 .ssh]$ ssh oracle@homeserver2
Last login: Tue May  7 00:23:31 2013 from homeserver1.oracle
[oracle@homeserver2 ~]$


No comments:

Post a Comment