探测TCP端口
[root@sre01 ~]# nc -zv 192.168.236.100 22
Ncat: Version 7.50 ( https://nmap.org/ncat )
Ncat: Connected to 192.168.236.100:22.
Ncat: 0 bytes sent, 0 bytes received in 0.02 seconds.
[root@sre01 ~]# nc -zv 192.168.236.100 23
Ncat: Version 7.50 ( https://nmap.org/ncat )
Ncat: Connection refused.
探测UDP端口
[root@sre01 ~]# nc -zv -u 192.168.236.100 111
Ncat: Version 7.50 ( https://nmap.org/ncat )
Ncat: Connected to 192.168.236.100:111.
Ncat: Connection refused.
在指定端口监听(tcp 234端口)
[root@sre01 ~]# nc -l 234
标签:sre01,Centos,236.100,nc,192.168,Linux,root,Ncat
From: https://blog.51cto.com/zywqs/12167778