Difference between revisions of "Linbain远程接入"
Csjamesdeng (talk | contribs) |
Csjamesdeng (talk | contribs) (→通过VNC Viewer远程登录开发板) |
||
Line 97: | Line 97: | ||
* 在VNC Viewer输入开发板的IP地址。 | * 在VNC Viewer输入开发板的IP地址。 | ||
[[File:vnc-viewer.png|frameless]] | [[File:vnc-viewer.png|frameless]] | ||
+ | |||
+ | == SSH == | ||
+ | |||
+ | 远程登录开发板的命令行。在Linbian操作系统中,SSH服务默认是使能的。 | ||
+ | |||
+ | === 设置开发板网络连接 === | ||
+ | |||
+ | 确保开发板启动并网络连接正常。根据[[#IP地址|这个指南]]查看你的开发板的IP地址。 | ||
+ | |||
+ | === 设置SSH客户端 === | ||
+ | |||
+ | 对于Linux和Mac操作系统,SSH客户端默认已经安装。对于Windows和移动设备,可以用第三方的SSH客户端。 | ||
+ | |||
+ | ==== Linux或Mac操作系统 ==== | ||
+ | |||
+ | 在电脑终端输入下面的命令,把'''<IP>'''替换成开发板的IP地址。 | ||
+ | <pre> | ||
+ | $ ssh ai@<IP> | ||
+ | </pre> | ||
+ | |||
+ | 如果连接超时,可能是你输错了IP地址。 | ||
+ | |||
+ | 连接成功后,你会收到安全性/真实性的警告(只在首次连接收到)。输入'''yes'''即可。 | ||
+ | |||
+ | 然后根据提示输入ai用户密码:'''lindeni'''。为了安全起见,强烈建议你登录后修改默认密码。 | ||
+ | |||
+ | ==== Using Windows ==== | ||
+ | |||
+ | You may need to download an SSH client. The most commonly used client is called PuTTY and can be downloaded from [https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html here]. | ||
+ | |||
+ | * Add your board as a host | ||
+ | |||
+ | [[File:ssh-win-config.png|frameless]] | ||
+ | |||
+ | Type the IP address of the board into the '''Host Name''' field and click the '''Open''' button. | ||
+ | |||
+ | * Connect | ||
+ | When the connection works you will see the security warning shown below. You can safely ignore it, and click the '''Yes''' button. You will only see this warning the first time PuTTY connects to a board that it has not seen before. | ||
+ | |||
+ | [[File:ssh-win-warning.png|frameless]] | ||
+ | |||
+ | You will now see the usual login prompt. Log in with username '''ai''' and password '''lindeni'''. You should now have the board prompt which will be identical to the one found on the board itself. | ||
+ | |||
+ | [[File:ssh-win-window.png|frameless]] |
Revision as of 03:10, 25 October 2018
Contents
IP地址
开发板有接显示设备
打开终端,输入hostname -I即可查看开发板的地址。
开发板没接显示设备
通过路由器设备列表
在浏览器输入你路由器的IP地址(通常可以在路由器外壳上找到),例如:http://192.168.3.1。登录后查看已连接的设备,从中找到你的开发板和开发板的IP地址。
通过手机App
Fing app是一个免费的网络扫描工具,支持iOS和Android。
让手机和开发板处于同一个网络下,打开Fing app,单击左上角的Fing按钮。几秒钟后,你就能看到所有连接到该网络的设备。
远程桌面
远程登录开发板的图形桌面。
安装VNC server
在开发板上,运行以下命令,安装最新版本的VNC server。
$ sudo apt-get update $ sudo apt-get install tightvncserver
使能VNC server
运行以下命令使能VNC Server:
$ vncpasswd $ tightvncserver
设置VNC server开机后自启动
- 在/etc/init.d/目录下创建一个文件,例如:tightvncserver。
$ sudo vi /etc/init.d/tightvncserver
添加以下内容:
#!/bin/sh ### BEGIN INIT INFO # Provides: tightvncserver # Required-Start: $local_fs # Required-Stop: $local_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start/stop tightvncserver ### END INIT INFO ### Customize this entry # Set the USER variable to the name of the user to start tightvncserver under export USER='ai' ### End customization required eval cd ~$USER case "$1" in start) su $USER -c '/usr/bin/tightvncserver -depth 16 -geometry 800x600 :1' echo "Starting TightVNC server for $USER " ;; stop) su $USER -c '/usr/bin/tightvncserver -kill :1' echo "Tightvncserver stopped" ;; *) echo "Usage: /etc/init.d/tightvncserver {start|stop}" exit 1 ;; esac exit 0
- 给文件添加可执行权限
$ sudo chmod +x /etc/init.d/tightvncserver
- 更新启动列表
sudo update-rc.d tightvncserver defaults
通过VNC Viewer远程登录开发板
SSH
远程登录开发板的命令行。在Linbian操作系统中,SSH服务默认是使能的。
设置开发板网络连接
确保开发板启动并网络连接正常。根据这个指南查看你的开发板的IP地址。
设置SSH客户端
对于Linux和Mac操作系统,SSH客户端默认已经安装。对于Windows和移动设备,可以用第三方的SSH客户端。
Linux或Mac操作系统
在电脑终端输入下面的命令,把<IP>替换成开发板的IP地址。
$ ssh ai@<IP>
如果连接超时,可能是你输错了IP地址。
连接成功后,你会收到安全性/真实性的警告(只在首次连接收到)。输入yes即可。
然后根据提示输入ai用户密码:lindeni。为了安全起见,强烈建议你登录后修改默认密码。
Using Windows
You may need to download an SSH client. The most commonly used client is called PuTTY and can be downloaded from here.
- Add your board as a host
Type the IP address of the board into the Host Name field and click the Open button.
- Connect
When the connection works you will see the security warning shown below. You can safely ignore it, and click the Yes button. You will only see this warning the first time PuTTY connects to a board that it has not seen before.
You will now see the usual login prompt. Log in with username ai and password lindeni. You should now have the board prompt which will be identical to the one found on the board itself.