玩转树莓派(二)

今天通过一条网线,把PC(192.168.0.110)和树莓派(192.168.0.111)连了起来,互相能ping通.

读书时,我记得舍友是试过将两台电脑用网线连在一起的,但是好像是没有ping通,可能windows的安全机制做得好吧.

这次竟然ping通了,说明我中间的这条网线确实是起作用了!

在派端,通过arp -a,能发现我PC的网卡;

root@raspberrypi:~# arp -a
hon.local (192.168.0.110) at 28:d2:44:e4:df:33 [ether] on eth0

在PC端,通过arp -a,也能发现树莓派的网卡:

hon@hon:~$ arp -a
localhost (192.168.0.111) 位于 b8:27:eb:98:0f:2a [ether] 在 eth0
localhost (192.168.1.1) 位于 2c:cf:58:15:bf:21 [ether] 在 wlan0
但是有个问题没有解决: 从我的PC是可以ssh到派上,但是从派上却ssh不到PC, 说是22号端口不让访问![是因为PC上没有sshd]

原文地址:https://www.cnblogs.com/honpey/p/6059627.html