From: Miroslav Miklus Date: Wed, 21 Sep 2016 14:59:57 +0000 (+0200) Subject: Enable paramiko ssh keepalive (10s) X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=commitdiff_plain;h=14085cfc14bdd3213083b4488e2cd7a15c09a7d9;ds=sidebyside Enable paramiko ssh keepalive (10s) Change-Id: I1e46ad76f033d239ad29d3b6fe00011a4444453d Signed-off-by: Miroslav Miklus --- diff --git a/resources/libraries/python/ssh.py b/resources/libraries/python/ssh.py index f35b925d10..298c93ee8e 100644 --- a/resources/libraries/python/ssh.py +++ b/resources/libraries/python/ssh.py @@ -65,6 +65,8 @@ class SSH(object): password=node.get('password'), pkey=pkey, port=node['port']) + self._ssh.get_transport().set_keepalive(10) + SSH.__existing_connections[node_hash] = self._ssh logger.trace('connect took {} seconds'.format(time() - start))