使用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命令查看。如果正常的话的,你可以看到以下信息(这个应该是没有太大问题的)。

debian@arm:~$ sudo ifconfig -a
eth0      Link encap:Ethernet  HWaddr c8:a0:30:b0:16:72  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:56 

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:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

usb0      Link encap:Ethernet  HWaddr 16:d1:f7:ef:f5:9f  
          inet addr:192.168.7.2  Bcast:192.168.7.3  Mask:255.255.255.252
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

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

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

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

debian@arm:~$ sudo ifconfig -a
eth0      Link encap:Ethernet  HWaddr c8:3a:35:c4:04:8e  
          inet addr:192.168.100.102  Bcast:192.168.100.255  Mask:255.255.255.0
          inet6 addr: fe80::ca3a:35ff:fec4:48e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2764 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1276 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:202768 (198.0 KiB)  TX bytes:146478 (143.0 KiB)
  3.采用Xshell的SSH连接。注意,主机IP即为查询到的IP,端口默认为22。具体的Xshell使用请问度娘。

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

Connecting to 192.168.100.102:22...
Connection established.
To escape to local shell, press 'Ctrl+Alt+]'.

Linux arm 3.8.13-bone40 #1 SMP Fri Jan 31 07:31:37 UTC 2014 armv7l

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: Mon Feb 24 11:52:00 2014 from 192.168.100.100
debian@arm:~$ 


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

你可能感兴趣的:(BeagleBone,Black)