搜telnet的语法:
telnet [-a][-e escape char][-f log file][-l user][-t term][host [port]]登录命令:telnet HOST [PORT] 例如:telnet 61.152.158.132 23(默认端口)
然后自己去试试:
licrifandeMacBook-Pro:SwiftXMPP.xcodeproj crifan$ telnet --help telnet: illegal option -- - usage: telnet [-4] [-6] [-8] [-E] [-K] [-L] [-N] [-S tos] [-X atype] [-c] [-d] [-e char] [-k realm] [-l user] [-f/-F] [-n tracefile] [-r] [-s src_addr] [-u] [-P policy] [host-name [port]] licrifandeMacBook-Pro:SwiftXMPP.xcodeproj crifan$ telnet 192.168.1.234:5000 Trying 202.102.110.203... ^C licrifandeMacBook-Pro:SwiftXMPP.xcodeproj crifan$ telnet 192.168.1.234 5000 Trying 192.168.1.234... telnet: connect to address 192.168.1.234: Connection refused telnet: Unable to connect to remote host licrifandeMacBook-Pro:SwiftXMPP.xcodeproj crifan$ telnet 192.168.1.234 Trying 192.168.1.234... telnet: connect to address 192.168.1.234: Connection refused telnet: Unable to connect to remote host licrifandeMacBook-Pro:SwiftXMPP.xcodeproj crifan$ telnet 192.168.1.234 5000 Trying 192.168.1.234... ^C licrifandeMacBook-Pro:SwiftXMPP.xcodeproj crifan$ telnet 192.168.1.234 5000 Trying 192.168.1.234... telnet: connect to address 192.168.1.234: Connection refused telnet: Unable to connect to remote host licrifandeMacBook-Pro:SwiftXMPP.xcodeproj crifan$ licrifandeMacBook-Pro:SwiftXMPP.xcodeproj crifan$ licrifandeMacBook-Pro:SwiftXMPP.xcodeproj crifan$ licrifandeMacBook-Pro:SwiftXMPP.xcodeproj crifan$ telnet 192.168.1.234 5000 Trying 192.168.1.234... telnet: connect to address 192.168.1.234: Connection refused telnet: Unable to connect to remote host licrifandeMacBook-Pro:SwiftXMPP.xcodeproj crifan$
结果:
暂时连不通。。
转载请注明:在路上 » [记录]mac用去使用telnet命令去测试连通性