现在问题是,如果ssh&ping to target可以从桌面而不是笔记本电脑上运行?
我已经能够使用以下命令从我的DESKTOP ssh到我的目标:---目标IP固定在/ etc / network / interfaces中
1> target ip - 192.168.0.202
target gateway - 192.168.0.200
target netmask - 255.255.255.0
2> Desktop ip - 192.168.0.204
Desktop gateway - 192.168.0.200
Desktop netmask - 255.255.255.0
3> ssh pi@192.168.0.202
----- ping 192.168.0.202
----- >>从桌面上运行良好
4>现在我正在尝试使用我的笔记本电脑。我的笔记本电脑也有Wi-Fi。我在笔记本电脑上禁用了Wi-Fi功能。并将我的目标直接连接到笔记本电脑。我使用设置笔记本电脑的IP地址。
sudo ifconfig eth0 192.168.0.240 netmask 255.255.255.0
5>从我的笔记本电脑Ping到目标会出现以下错误: -
ignite@ubuntu:~$ ping 192.168.0.202
PING 192.168.0.202 (192.168.0.202) 56(84) bytes of data.
ping: sendmsg: Network is unreachable
ping: sendmsg: Network is unreachable
6>如果我在笔记本电脑上使用ifconfig: -
ignite@ubuntu:~$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:90:f5:a9:89:6a
inet addr:192.168.0.240 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:46 errors:0 dropped:0 overruns:0 frame:0
TX packets:1132 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2760 (2.7 KB) TX bytes:261875 (261.8 KB)
Interrupt:41
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:16436 Metric:1
RX packets:5946 errors:0 dropped:0 overruns:0 frame:0
TX packets:5946 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:571442 (571.4 KB) TX bytes:571442 (571.4 KB)