diff options
author | Koren Lev <korenlev@gmail.com> | 2017-12-18 19:16:16 +0200 |
---|---|---|
committer | Koren Lev <korenlev@gmail.com> | 2017-12-18 17:20:35 +0000 |
commit | c8440f4158805fed1c49d1f06cd71f324eac26a2 (patch) | |
tree | a201a8273361a89190638b31b1d1b8193fa59f74 /app/utils/ssh_connection.py | |
parent | 78b0f48b178325c74d5609bac5c764ac111ad808 (diff) |
release 1.2 + new tagging
Change-Id: I1e876451ec4a330f458dd57adadb15e39969b225
Signed-off-by: Koren Lev <korenlev@gmail.com>
(cherry picked from commit 98c3ac7c859e34fe60d061b9ca591aba429e4118)
Diffstat (limited to 'app/utils/ssh_connection.py')
-rw-r--r-- | app/utils/ssh_connection.py | 6 |
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)) |