Index: server/hosts/abstract_ssh.py |
diff --git a/server/hosts/abstract_ssh.py b/server/hosts/abstract_ssh.py |
index 3d8d9e9b5c3fe6928e15aa126bac887a598cfbc3..3723c46b526d13da354d8930cded353c9658ea68 100644 |
--- a/server/hosts/abstract_ssh.py |
+++ b/server/hosts/abstract_ssh.py |
@@ -115,6 +115,17 @@ class AbstractSSHHost(SiteHost): |
" ".join(sources), dest) |
+ def _make_ssh_cmd(self, cmd): |
+ """ |
+ Create a base ssh command string for the host which can be used |
+ to run commands directly on the machine |
+ """ |
+ base_cmd = make_ssh_command(user=self.user, port=self.port, |
+ opts=self.master_ssh_option, |
+ hosts_file=self.known_hosts_fd) |
+ |
+ return '%s %s "%s"' % (base_cmd, self.hostname, utils.sh_escape(cmd)) |
+ |
def _make_scp_cmd(self, sources, dest): |
""" |
Given a list of source paths and a destination path, produces the |