码迷,mamicode.com
首页 > 系统相关 > 详细

macos环境测试远程端口是否通

时间:2020-04-11 22:21:35      阅读:967      评论:0      收藏:0      [点我收藏+]

标签:rip   ann   telnet   netca   macos   端口号   des   ipv6   this   

ping端口:nc -vz -w 2 www.baidu.com 8080

NAME
nc -- arbitrary TCP and UDP connections and listens

DESCRIPTION
The nc (or netcat) utility is used for just about anything under the sun involving TCP or UDP. It can open TCP connections, send UDP packets, listen on arbitrary TCP and UDP ports, do port scanning, and deal with both IPv4 and IPv6. Unlike telnet(1), nc scripts nicely, and separates error messages onto standard error instead of sending them to standard output, as telnet(1) does with some.

 -v      details
 -z      Specifies that nc should just scan for listening daemons, without sending any data to them.  It is an error to use this option in conjunction with the -l option.
     -w     timeout

     主机和端口号不能缺失

macos环境测试远程端口是否通

标签:rip   ann   telnet   netca   macos   端口号   des   ipv6   this   

原文地址:https://blog.51cto.com/rhino/2486476

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!