Hello everyone,
I have one host that is extremely slow to respond (30 seconds or more).
When I connect with paramiko.SSHClient() using username and password,
the connection fails immediately for some reason.
However, then I undertake 2nd connection attempt using a key. During
that time paramiko hangs much longer than the timeout specified and
consumes close to 100% of cpu.
This fails immediately:
self.conobj = paramiko.SSHClient()
self.conobj.connect(self.ip, username=self.username,
password=self.passw, port=self.port, timeout=opts.timeout,
allow_agent=False, look_for_keys = False)
This hangs:
self.conobj.connect(self.ip, username=self.username,
key_filename=self.sshprivkey, port=self.port, timeout=opts.timeout)
When I connect to that host using Putty, this is what happens in the
putty log during the time when connection is hanging:
2010-02-05 12:53:28 Looking up host "****"
2010-02-05 12:53:28 Connecting to **** port 22
2010-02-05 12:53:36 Server version: SSH-2.0-Sun_SSH_1.0.1
2010-02-05 12:53:36 We believe remote version has SSH-2 rekey bug
2010-02-05 12:53:36 We claim version: SSH-2.0-PuTTY_Release_0.60
2010-02-05 12:53:36 Using SSH protocol version 2
2010-02-05 12:53:38 Using Diffie-Hellman with standard group "group1"
2010-02-05 12:53:38 Doing Diffie-Hellman key exchange with hash SHA-1
I'd like to resolve this problem somehow, that is, I would like to break
connection attempt during specified timeout and not consume cpu like that.
Regards,
mk
_______________________________________________
paramiko mailing list
paramiko@lag.net
http://www.lag.net/cgi-bin/mailman/listinfo/paramiko