【问题标题】:How to connect telnet to particular port of host?如何将telnet连接到主机的特定端口?
【发布时间】:2019-06-24 13:42:35
【问题描述】:

我有 HOST='xx.xxx.xx.xx' 和 PORT = xxxx

我试过                                                                                                       

tn = telnetlib.Telnet(HOST, port=PORT, timeout=5)

我收到了这个错误

ConnectionRefusedError: [Errno 61] 连接被拒绝

除了默认端口之外,还有其他方法可以远程登录到端口吗?

【问题讨论】:

标签: python python-3.x telnet telnetlib


【解决方案1】:

ConnectionRefused 表示服务器拒绝了您的连接,这反过来可能意味着该端口上没有运行 telnet 服务。只要 telnet 服务在服务器的该端口上运行,您就可以对任何端口进行 telnet。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-04-25
    • 1970-01-01
    • 1970-01-01
    • 2013-08-07
    • 1970-01-01
    • 1970-01-01
    • 2018-01-06
    • 2016-09-27
    相关资源
    最近更新 更多