Ssh identities only (#6931)

This commit is contained in:
Alex Wu
2020-01-27 15:01:21 -08:00
committed by Edward Oakes
parent e0078a0d78
commit d9a2294298
+3 -2
View File
@@ -172,6 +172,7 @@ class SSHCommandRunner:
("ControlMaster", "auto"),
("ControlPath", "{}/%C".format(self.ssh_control_path)),
("ControlPersist", "10s"),
("IdentitiesOnly", "yes"),
]
return ["-i", self.ssh_private_key] + [
@@ -276,8 +277,8 @@ class SSHCommandRunner:
])
def remote_shell_command_str(self):
return "ssh -i {} {}@{}\n".format(self.ssh_private_key, self.ssh_user,
self.ssh_ip)
return "ssh -o IdentitiesOnly=yes -i {} {}@{}\n".format(
self.ssh_private_key, self.ssh_user, self.ssh_ip)
class NodeUpdater: