Interactive terminal fixes
[csit.git] / resources / libraries / python / ssh.py
index f35b925..b470e86 100644 (file)
@@ -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))
@@ -211,7 +213,7 @@ class SSH(object):
 
     @staticmethod
     def interactive_terminal_exec_command(chan, cmd, prompt,
-                                          time_out=10):
+                                          time_out=30):
         """Execute command on interactive terminal.
 
         interactive_terminal_open() method has to be called first!