ubuntu 18.04 网线直连树莓派远程登录
1. 网线连接
2. 安装nm-connection-editor
sudo apt-get install nm-connection-editor
3. 设置网络共享
运行指令
nm-connection-editor
双击Wired connection 1,设置IPV4的方法为shared
4. 运行ifconfig确认本地IP(比如:10.42.0.1)
ifconfig
5. 安装nmap,扫描树莓派IP地址(比如:10.42.0.132)
sudo apt-get install nmap
nmap 10.42.0/24
Starting Nmap 7.60 ( https://nmap.org ) at 2020-10-19 17:27 CST
Nmap scan report for allen-OptiPlex-7040 (10.42.0.1)
Host is up (0.000058s latency).
Not shown: 993 closed ports
PORT STATE SERVICE
21/tcp open ftp
22/tcp open ssh
53/tcp open domain
111/tcp open rpcbind
139/tcp open netbios-ssn
445/tcp open microsoft-ds
2049/tcp open nfs
Nmap scan report for 10.42.0.132
Host is up (0.0035s latency).
Not shown: 996 closed ports
PORT STATE SERVICE
22/tcp open ssh
53/tcp open domain
5900/tcp open vnc
8080/tcp open http-proxy
Nmap done: 256 IP addresses (2 hosts up) scanned in 2.75 seconds
6. ssh登录
ssh pi@10.42.0.132