Python 3.7 面料2.4.0 无法连接远程电脑 如果我尝试使用其他端口,请使用端口3389(如mstsc)-获取“无法连接到端口”
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)
答案 0 :(得分:0)
端口3389通常用于Windows RDP,而不用于ssh。您可能正在尝试通过WinRM(通常是端口5985-86)进行连接,在这种情况下,请使用pywinrm library,而不要使用Fabric。最好使用可连接此功能的ansible。