From d9a22942988483afb0f5a45468fc2794e3e2ae47 Mon Sep 17 00:00:00 2001 From: Alex Wu Date: Mon, 27 Jan 2020 15:01:21 -0800 Subject: [PATCH] Ssh identities only (#6931) --- python/ray/autoscaler/updater.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/ray/autoscaler/updater.py b/python/ray/autoscaler/updater.py index cc1899b67..b5bae21ae 100644 --- a/python/ray/autoscaler/updater.py +++ b/python/ray/autoscaler/updater.py @@ -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: