From 6e2f3b6548f0d42582906b869760e91f0045d20b Mon Sep 17 00:00:00 2001 From: Robey Pointer Date: Wed, 12 Apr 2006 13:36:12 -0700 Subject: [project @ robey@lag.net-20060412203612-863c46529730f786] bump up the default banner timeout to 15 seconds and make it configurable via (undocumented) Transport.banner_timeout --- paramiko/transport.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/paramiko/transport.py b/paramiko/transport.py index 59051782..d6ee2669 100644 --- a/paramiko/transport.py +++ b/paramiko/transport.py @@ -287,7 +287,8 @@ class Transport (threading.Thread): self.auth_handler = None self.global_response = None # response Message from an arbitrary global request self.completion_event = None # user-defined event callbacks - + self.banner_timeout = 15 # how long (seconds) to wait for the SSH banner + # server mode: self.server_mode = False self.server_object = None @@ -1411,9 +1412,10 @@ class Transport (threading.Thread): def _check_banner(self): # this is slow, but we only have to do it once for i in range(5): - # give them 5 seconds for the first line, then just 2 seconds each additional line + # give them 15 seconds for the first line, then just 2 seconds + # each additional line. (some sites have very high latency.) if i == 0: - timeout = 5 + timeout = self.banner_timeout else: timeout = 2 try: -- cgit v1.2.3