mirror of
https://github.com/wassname/ray.git
synced 2026-07-11 20:24:58 +08:00
Ssh identities only (#6931)
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user