获取 paramiko.ssh_exception.SSHException:由于连接 (Python),读取 SSH 协议横幅时出错

Get paramiko.ssh_exception.SSHException: Error reading SSH protocol banner due connection (Python)

Python 3.7 面料 2.4.0 无法连接远程PC 使用端口 3389(如 mstsc),如果我正在尝试另一个端口 - get "Unable to connect to port on "

v = Connection(host=ServName, port=Port, user=User, connect_kwargs={'password': 's3cr3t'})
print(v.is_connected) #get False
v.run('dir') #get error (see img attach below)

端口 3389 通常用于 windows RDP 而不是 ssh。您可能正在尝试通过 WinRM(通常是端口 5985-86)进行连接,在这种情况下使用 pywinrm library 而不是 fabric。你最好使用内置了这种连接的 ansible。