BugFix: fix storperf_admin-rc problem
[yardstick.git] / yardstick / ssh.py
index 339f834..cf890df 100644 (file)
@@ -121,7 +121,9 @@ class SSH(object):
             self._client.connect(self.host, username=self.user,
                                  port=self.port, pkey=self.pkey,
                                  key_filename=self.key_filename,
-                                 password=self.password, timeout=1)
+                                 password=self.password,
+                                 allow_agent=False, look_for_keys=False,
+                                 timeout=1)
             return self._client
         except Exception as e:
             message = ("Exception %(exception_type)s was raised "
@@ -261,3 +263,8 @@ class SSH(object):
 
         with SCPClient(client.get_transport()) as scp:
             scp.put(files, remote_path, recursive)
+
+    # keep shell running in the background, e.g. screen
+    def send_command(self, command):
+        client = self._get_client()
+        client.exec_command(command, get_pty=True)