aboutsummaryrefslogtreecommitdiffstats
path: root/app/utils/ssh_connection.py
diff options
context:
space:
mode:
authorKoren Lev <korenlev@gmail.com>2017-12-18 19:16:16 +0200
committerKoren Lev <korenlev@gmail.com>2017-12-18 19:16:16 +0200
commit98c3ac7c859e34fe60d061b9ca591aba429e4118 (patch)
tree3ff2629def8938b12c0a0147e463e74e475c9032 /app/utils/ssh_connection.py
parent4709d96cc240c0c4c5308d40361ca3c3da1152fd (diff)
release 1.2 + new tagging
Change-Id: I1e876451ec4a330f458dd57adadb15e39969b225 Signed-off-by: Koren Lev <korenlev@gmail.com>
Diffstat (limited to 'app/utils/ssh_connection.py')
-rw-r--r--app/utils/ssh_connection.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/utils/ssh_connection.py b/app/utils/ssh_connection.py
index e9dd39a..b9b1cde 100644
--- a/app/utils/ssh_connection.py
+++ b/app/utils/ssh_connection.py
@@ -22,6 +22,7 @@ class SshConnection(BinaryConverter):
max_call_count_per_con = 100
timeout = 15 # timeout for exec in seconds
+ CONNECT_TIMEOUT = 5
DEFAULT_PORT = 22
@@ -118,7 +119,8 @@ class SshConnection(BinaryConverter):
pkey=k,
port=self.port if self.port is not None
else self.DEFAULT_PORT,
- password=self.pwd, timeout=30)
+ password=self.pwd,
+ timeout=self.CONNECT_TIMEOUT)
else:
port = None
try:
@@ -127,7 +129,7 @@ class SshConnection(BinaryConverter):
username=self.user,
password=self.pwd,
port=port,
- timeout=30)
+ timeout=self.CONNECT_TIMEOUT)
except paramiko.ssh_exception.AuthenticationException:
self.log.error('Failed SSH connect to host {}, port={}'
.format(self.host, port))