使用 nmap 查询局域网内所有 开放端口的机器 IP 和 MAC
nmap -sS 10.1.203.2-253 -p 22
Starting Nmap 7.70 ( https://nmap.org ) at 2021-06-29 10:03 CST
Nmap scan report for 10.1.203.2
Host is up (-0.087s latency).
PORT STATE SERVICE
22/tcp closed ssh
MAC Address: 2C:4D:54:50:38:4D (Asustek Computer)
Nmap scan report for 10.1.203.6
Host is up (0.00041s latency).
PORT STATE SERVICE
22/tcp open ssh
MAC Address: DC:A6:32:1B:9E:D5 (Unknown)
Nmap scan report for 10.1.203.11
Host is up (0.00028s latency)