diff --git a/experimental/ssh/internal/client/client.go b/experimental/ssh/internal/client/client.go index 6a294b5935..a3c3d78889 100644 --- a/experimental/ssh/internal/client/client.go +++ b/experimental/ssh/internal/client/client.go @@ -252,6 +252,7 @@ func spawnSSHClient(ctx context.Context, userName, privateKeyPath string, server sshArgs := []string{ "-l", userName, "-i", privateKeyPath, + "-o", "IdentitiesOnly=yes", "-o", "StrictHostKeyChecking=accept-new", "-o", "ConnectTimeout=360", "-o", "ProxyCommand=" + proxyCommand, diff --git a/experimental/ssh/internal/setup/setup.go b/experimental/ssh/internal/setup/setup.go index 4359a954da..b68fa7eef2 100644 --- a/experimental/ssh/internal/setup/setup.go +++ b/experimental/ssh/internal/setup/setup.go @@ -96,6 +96,7 @@ Host %s User root ConnectTimeout 360 StrictHostKeyChecking accept-new + IdentitiesOnly yes IdentityFile %q ProxyCommand %s `, opts.HostName, identityFilePath, proxyCommand)