Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a issue with remote server connection using ssh. I have a serverA on xxx.xxx.xxx.xx1 with default port 22. I have an another serverB on xxx.xxx.xxx.xx2 same default port22. Now I want to coonect serverB from serverA using ssh. I used the following command

[userA@localhost~] # ssh userB@serverB

When I run this command then I got the error as below

ssh: connect to host xxx.xxx.xxx.xx1 port 22: No route to host

One more this when I login the serverA then I see the prompt like [userA@Localhost~] #

I did not understand that why it shows like above bold text while it should be show as [userA@serverA ~] # Any one has any idea to resolve this issue. thanks

Note: Any query you can ask frenkly. I am newbie for remote connection using ssh

updated

I already ping but got the below response

[userA@localhost ~]# /bin/ping xxx.xxx.xxx.xx1
PING xxx.xxx.xxx.xx1 (xxx.xxx.xxx.xx1) 56(84) bytes of data.
From 192.168.24.1: icmp_seq=2 Redirect Host(New nexthop: xxx.xxx.xxx.xx1)
From 192.168.24.1: icmp_seq=3 Redirect Host(New nexthop: xxx.xxx.xxx.xx1)
From 192.168.24.1: icmp_seq=4 Redirect Host(New nexthop: xxx.xxx.xxx.xx1)
From 192.168.24.1 icmp_seq=2 Destination Host Unreachable
From 192.168.24.1 icmp_seq=3 Destination Host Unreachable
From 192.168.24.1 icmp_seq=4 Destination Host Unreachable
From 192.168.24.1: icmp_seq=5 Redirect Host(New nexthop: xxx.xxx.xxx.xx1)
From 192.168.24.1: icmp_seq=6 Redirect Host(New nexthop: xxx.xxx.xxx.xx1)
From 192.168.24.1: icmp_seq=8 Redirect Host(New nexthop: xxx.xxx.xxx.xx1)
From 192.168.24.1 icmp_seq=6 Destination Host Unreachable
From 192.168.24.1 icmp_seq=7 Destination Host Unreachable
From 192.168.24.1 icmp_seq=8 Destination Host Unreachable
From 192.168.24.1: icmp_seq=11 Redirect Host(New nexthop: xxx.xxx.xxx.xx1)
From 192.168.24.1 icmp_seq=10 Destination Host Unreachable
From 192.168.24.1 icmp_seq=11 Destination Host Unreachable
From 192.168.24.1 icmp_seq=12 Destination Host Unreachable
From 192.168.24.1 icmp_seq=13 Destination Host Unreachable
From 192.168.24.1 icmp_seq=14 Destination Host Unreachable
From 192.168.24.1 icmp_seq=15 Destination Host Unreachable
From 192.168.24.1: icmp_seq=17 Redirect Host(New nexthop: xxx.xxx.xxx.xx1)
From 192.168.24.1 icmp_seq=17 Destination Host Unreachable
From 192.168.24.1 icmp_seq=18 Destination Host Unreachable

Updated-2

I run the netstat command and got the result as

[userA@localhost ~]# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
192.168.24.0    0.0.0.0         255.255.255.0   U         0 0          0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0
0.0.0.0         192.168.24.1    0.0.0.0         UG        0 0          0 eth0
share|improve this question

closed as unclear what you're asking by Gilles, slm, Anthon, terdon, bahamat Oct 10 '13 at 8:43

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
Look for any firewall on ServerB which might block the ssh connection. Use telnet as in telnet xx.xx.xx.2 22 to test the connection. But first use ping xx.xx.xx.2 and see if you get any response. Finally iptables -F; iptables -X might also help. –  val0x00ff Oct 8 '13 at 9:59
    
@ val0x00ff : please see my updates. I already used ping command for both serverA and serverB and got the same result as shown in updates. –  Ghost Answer Oct 8 '13 at 10:05
1  
well, there's your answer. somethings redirecting you, probably some firewall. –  Bananguin Oct 8 '13 at 10:14
    
@GhostAnswer Please show route -n or netstat -rn You've some routing issues. –  val0x00ff Oct 8 '13 at 10:20
6  
It's ridiculous to hide IP addresses with start with 192.168 or 10. Those are not public IPs, so please put full IPs next time if they are not public. See en.wikipedia.org/wiki/Private_network or tools.ietf.org/html/rfc1918 –  Jiri Xichtkniha Oct 8 '13 at 11:36

Browse other questions tagged or ask your own question.