Python 3.7 Fabric 2.4.0 Can't connect remote PC using port 3389 (like mstsc), if i'm trying another port - 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'dir') #get error (see img attach below)

Image of the error

1 Answers

2ps On Best Solutions

Port 3389 is typically used for windows RDP and not for ssh. You might be trying to connect via WinRM (usually ports 5985-86) in which case use the pywinrm library and not fabric. You're better off using ansible which has this connectivity baked in.