使用SSH操作Beaglebone Black

按照惯例,还是先将要感谢的兄弟姐妹感谢完了再写正文。感谢CSDN论坛、EEWorld论坛上的兄弟姐妹,请原谅我在事后记录的时候忘了你们的大名,如果对大家有用,是你们的功力深厚,如果是对大家无用,原谅我的才疏学浅!微笑

前面我们说过,通过串口可以连接BBB,但串口的速度。。。。,不信你可以试试dmesg。如果有网络,SSH是最方便使用BBB的方式之一,可以不用额外增加显示器、键盘、鼠标,何乐而不为?

一、用USB通过SSH连接BBB

如果你的win下的驱动已装好,你可以直接通过SSH连接,连接的主机IP是:192.168.7.2。具体参照网上一位大牛的《BeagleBone Black的USB一线通》(好像是这个名字),不详说,这个是利用了BBB的USB OTG接口模拟的一个网卡,赞一句BBB够强大!

二、用eth0通过SSH连接BBB

如果你的系统安装好了,是默认配置好了eth0的,可通过ifconfig命令查看。如果正常的话的,你可以看到以下信息(这个应该是没有太大问题的)。

 1:  debian@arm:~$ sudo ifconfig -a
 2:  eth0      Link encap:Ethernet  HWaddr c8:a0:30:b0:16:72  
 3:  UP BROADCAST MULTICAST  MTU:1500  Metric:1
 4:  RX packets:0 errors:0 dropped:0 overruns:0 frame:0
 5:  TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
 6:  collisions:0 txqueuelen:1000 
 7:             RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
 8:  Interrupt:56 
 9:   
10:            lo        Link encap:Local Loopback  
11:            inet addr:127.0.0.1  Mask:255.0.0.0
12:            inet6 addr: ::1/128 Scope:Host
13:            UP LOOPBACK RUNNING  MTU:65536  Metric:1
14:            RX packets:0 errors:0 dropped:0 overruns:0 frame:0
15:            TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
16:  collisions:0 txqueuelen:0 
17:             RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
18:   
19:             usb0      Link encap:Ethernet  HWaddr 16:d1:f7:ef:f5:9f  
20:             inet addr:192.168.7.2  Bcast:192.168.7.3  Mask:255.255.255.252
21:             UP BROADCAST MULTICAST  MTU:1500  Metric:1
22:             RX packets:0 errors:0 dropped:0 overruns:0 frame:0
23:             TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
24:  collisions:0 txqueuelen:1000 
25:             RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
26:   

 

其中的eth0即是BBB的以太网接口。按以下步骤操作:

1.将RJ45通过网线连接到路由器。

2.查看你的BBB的IP。两个办法,一个是采用路由器的管理工具来查看,不详说,在dhcp服务器的客户端列表是可以看见的。二是在BBB上查看(前提是你通过USB或串口已管理BBB)

1:  debian@arm:~$ sudo ifconfig -a
2:  eth0      Link encap:Ethernet  HWaddr c8:3a:35:c4:04:8e  
3:  inet addr:192.168.100.102  Bcast:192.168.100.255  Mask:255.255.255.0
4:  inet6 addr: fe80::ca3a:35ff:fec4:48e/64 Scope:Link
5:  UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
6:  RX packets:2764 errors:0 dropped:0 overruns:0 frame:0
7:  TX packets:1276 errors:0 dropped:0 overruns:0 carrier:0
8:  collisions:0 txqueuelen:1000 
9:             RX bytes:202768 (198.0 KiB)  TX bytes:146478 (143.0 KiB)

 

  3.采用Xshell的SSH连接。注意,主机IP即为查询到的IP,端口默认为22。具体的Xshell使用请问度娘。

如果一切无误,恭喜你,你可以看到你想见到的系统登录了。

 1:  Connecting to 192.168.100.102:22...
 2:  Connection established.
 3:  To escape to local shell, press 'Ctrl+Alt+]'.
 4:   
 5:  Linux arm 3.8.13-bone40 #1 SMP Fri Jan 31 07:31:37 UTC 2014 armv7l
 6:  
 7:  The programs included with the Debian GNU/Linux system are free software;
 8:  the exact distribution terms for each program are described in the
 9:  individual files in /usr/share/doc/*/copyright.
10:  
11:  Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
12:  permitted by applicable law.
13:  Last login: Mon Feb 24 11:52:00 2014 from 192.168.100.100
14:  debian@arm:~$ 
15:  
16:  

 

由于采用WIFI连接比较麻烦,下次专门将WIFI的使用。

你可能感兴趣的:(使用SSH操作Beaglebone Black)