我通过以太网连接到我尝试通过 ssh 连接的设备。
为此,我将 Ubuntu 上的有线连接编辑为静态 ip 10.11.0.2、网络掩码 255.255.255.0。这是我的以太网设备的 ifconfig(我手动配置的):
enp0s31f6 Link encap:Ethernet HWaddr <snip snip...>
inet addr:10.11.0.3 Bcast:10.11.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:40 errors:0 dropped:0 overruns:0 frame:0
TX packets:1273 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2560 (2.5 KB) TX bytes:98361 (98.3 KB)
Interrupt:16 Memory:f1200000-f1220000
当我尝试时
ssh [email protected]
我收到“没有到主机的路由”。但sudo nmap -p22 10.11.0.0/24
输出
Starting Nmap 7.01 ( https://nmap.org ) at 2017-05-03 08:04 CEST
Nmap scan report for 10.11.0.2
Host is up (0.0024s latency).
PORT STATE SERVICE
22/tcp filtered ssh
MAC Address: {correct MAC address DOES show up but I'm ommiting it}
Nmap scan report for 10.11.0.3
Host is up (0.00025s latency).
PORT STATE SERVICE
22/tcp open ssh
怎么会这样?这是trace -n
设备的输出(如果有帮助的话)
10.11.0.0 0.0.0.0 255.255.255.0 U 0 0 0 enp0s31f6