SSHClient.connect fails on Windows XP
Bug #411910 reported by
Andrew Wilkins
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
paramiko |
Fix Committed
|
High
|
Robey Pointer |
Bug Description
I have just upgraded to Paramiko 1.7.5 (Ernest), and tested it on a Windows XP host. Attempting to call SSHClient.connect fails with the following exception:
paramiko.
This bug appears to have been introduced with the new IPv6 support. Calling getaddrinfo may yield results with socktype=0, which are silently ignored by Paramiko. If you specify a hint of socket.SOCK_STREAM, the resulting socktype should be socket.SOCK_STREAM. i.e.
socket.
To post a comment you must log in.
Hi,
I had the same problem under Windows XP and i solved it with your guidance.
This is my patch for client.py.
$ diff -u client.py.old client.py getaddrinfo( hostname, port): getaddrinfo( hostname, port, socket.AF_UNSPEC, socket.SOCK_STREAM =socket. SOCK_STREAM:
addr = sockaddr
--- client.py.old 2009-08-11 16:32:32.000000000 +0200
+++ client.py 2009-08-11 16:23:10.000000000 +0200
@@ -274,7 +274,7 @@
@raise socket.error: if a socket error occurred while connecting
"""
for (family, socktype, proto, canonname, sockaddr) in \
- socket.
+ socket.
):
if socktype=
af = family