[paramiko] How to use settimeout with from_transport

Robey Pointer robey at lag.net
Sun May 20 17:24:50 PDT 2007


On 27 Apr 2007, at 15:50, James Bardin wrote:

> Hi Robey,
>
> Just passing this along if you want to use it.
>
> I needed that ConnectTimeout option from openssh, so I added an  
> SSHClient.set_connect_timeout() method that sets the socket timeout  
> during the first connect, then transport takes over.
> Another idea would be to move transport's connect outside of the  
> constructor, and give it a separate connect method, but this was  
> faster for my needs.

I used this patch, but altered it slightly to just make 'timeout' an  
optional parameter to connect().

Thanks!

robey




More information about the paramiko mailing list