[英]How to connect telnet to particular port of host?
I have HOST='xx.xxx.xx.xx' and PORT = xxxx 我有HOST ='xx.xxx.xx.xx'和PORT = xxxx
I tried 我试过了
tn = telnetlib.Telnet(HOST, port=PORT, timeout=5)
I'm getting this error 我收到这个错误
ConnectionRefusedError: [Errno 61] Connection refused
ConnectionRefusedError:[Errno 61]连接被拒绝
Is there any other way to telnet to port other than default one? 除了默认端口以外,还有其他方法可以通过telnet进行端口连接吗?
ConnectionRefused
means that the Server refused your connection, which in-turn could mean that telnet service is not running on that port. ConnectionRefused
意味着服务器拒绝了您的连接,这又意味着telnet服务未在该端口上运行。 You can do telnet to any port only as long as the telnet service in running on that port in the server. 您只能对服务器上的端口运行telnet服务,才能对任何端口进行telnet。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.