测试端口通不通问题

1.使用 telnet (Windows 使用Cmd命令)

telnet 是 Windows标准服务

使用方法:

telnet ip port

例如:telnet 192.168.20.153 27017

ip:192.168.20.153

port:27017

2.使用 ssh  (Linux)

ssh  ip -p port 

例如:ssh 192.168.20.153 -p 27016

ip:192.168.20.153

port : 27016

成功:ssh_exchange_identification: Connection closed by remote host

失败: ssh: connect to host 192.168.20.153 port 27016: Connection refused

原文地址:https://www.cnblogs.com/XiangZiPeng/p/10710860.html