当我尝试使用 SSH 连接时,出现了非常奇怪的行为。为什么只有我复制并粘贴 IP 地址后它才有效?

当我尝试使用 SSH 连接时,出现了非常奇怪的行为。为什么只有我复制并粘贴 IP 地址后它才有效?

我遇到了一种非常奇怪的行为。

情况如下:我连接到我的树莓派从我的Ubuntu Linux 12.04使用SSH

因此,我执行以下操作:进入我的路由器网页(地址为 192.168.1.1),进入DHCP客户端部分,在这里我发现树莓派被分配了以下 IP 地址192.168.1.4,因此在 bash 中我执行以下命令:

andrea@andrea-virtual-machine:~$ sudo ssh [email protected]
[sudo] password for andrea: 
ssh: connect to host 192.168.1.4 port 22: No route to host

以及如何看到它因为找不到路线而失败。

好的...奇怪的是,如果我再次执行此操作复制粘贴从路由器管理页面到我的 shell 使用相同的 ip 地址,这样就可以了

andrea@andrea-virtual-machine:~$ sudo ssh [email protected]
[email protected]'s password: 
Linux raspberrypi 3.12.20+ #687 PREEMPT Fri May 30 16:39:11 BST 2014 armv6l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri Jun 13 20:39:18 2014 from 192.168.1.5
miner@raspberrypi ~ $ 

这怎么可能?为什么?我该如何解决这个问题?

谢谢

相关内容