我有一台主机,连接到一个从机,IP:10.105.186.10
我 ping 该 IP:
jcl023es@debian:~$ ping 10.105.186.10
PING 10.105.186.10 (10.105.186.10) 56(84) bytes of data.
64 bytes from 10.105.186.10: icmp_seq=1 ttl=109 time=211 ms
64 bytes from 10.105.186.10: icmp_seq=2 ttl=109 time=210 ms
我做ssh:
jcl023es@debian:~$ ssh -p23 [email protected] -lroot
ssh: connect to host 10.105.186.10 port 23: No route to host
我的IP配置:
eth0 Link encap:Ethernet HWaddr c8:9c:dc:b2:0b:47
inet addr:10.208.185.120 Bcast:10.208.185.255 Mask:255.255.254.0
inet6 addr: fe80::ca9c:dcff:feb2:b47/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5873653 errors:0 dropped:0 overruns:0 frame:0
TX packets:2603300 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1565935198 (1.4 GiB) TX bytes:1006274056 (959.6 MiB)
eth0:0 Link encap:Ethernet HWaddr c8:9c:dc:b2:0b:47
inet addr:10.105.186.11 Bcast:10.105.186.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:3794 errors:0 dropped:0 overruns:0 frame:0
TX packets:3794 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:576227 (562.7 KiB) TX bytes:576227 (562.7 KiB)
我不明白路由表是如何工作的。我有这个:
Destination Gateway Genmask Flags MSS Window irtt Iface
default 10.208.185.252 0.0.0.0 UG 0 0 0 eth0
dhcp_sede_sur.l 10.208.185.252 255.255.255.255 UGH 0 0 0 eth0
10.105.186.0 * 255.255.255.0 U 0 0 0 eth0
10.208.184.0 * 255.255.254.0 U 0 0 0 eth0
所以有什么问题?为什么我不能 ssh 我的奴隶?我的是直接有线连接...
编辑:对我来说,接口是由其地址、掩码和网关定义的。大豆,我知道这 3 个(我的机器的),并且我知道从站的地址。似乎使我的接口与要连接的从属地址位于同一网络中还不够...“没有到主机的路由”消息是否与路由表有关?