沒有使用 ssh 到主機的路由

沒有使用 ssh 到主機的路由

我在使用 ssh 進行遠端伺服器連線時遇到問題。我在 xxx.xxx.xxx.xx1 上有一個伺服器 A,預設連接埠為 22。現在我想使用 ssh 從 serverA 連接 serverB。我使用了以下命令

[userA@localhost~] # ssh userB@serverB

當我運行此命令時,出現以下錯誤

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

當我登入 serverA 時,又會看到這樣的提示 [用戶A@本地主機~]#

我不明白為什麼它顯示為上面的粗體文本,而它應該顯示為 [userA@serverA ~] # 任何人都有解決此問題的想法。

更新

我已經 ping 但收到以下回應

[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

更新2

我運行 netstat 命令並得到結果為

[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

相關內容