The paramiko.Transport.connect method doesn't seem to support any
equivalent to openssh's ConnectTimeout option. This can lead to some
situations where a connection potentially hangs (forever?) during the
initial SSH handshake, or during authentication.

To deal with this I've replace the Transport.connect call with some
more complex code that puts a 30-second limit on the initial
negotiation and the authentication, as well as wrapping both calls
in a couple of retries before giving up entirely and throwing a
timeout exception.

Risk: High
Visibility: Changs how we initiate paramiko connections so that we can
add a timeout.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2986 592f7852-d20e-0410-864c-8624ca9c26a4
1 file changed