Skip to content

Commit ffe08e7

Browse files
author
neil
committed
add ssh retry
1 parent ee97ecb commit ffe08e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

anyvm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3352,13 +3352,13 @@ def fail_with_output(reason):
33523352
global_identity_block = ""
33533353
if hostid_file:
33543354
# Apply the VM key to all SSH hosts (requested behavior).
3355-
global_identity_block = "Host *\n IdentityFile {}\n IdentityFile ~/.ssh/id_rsa\n IdentityFile ~/.ssh/id_ed25519\n IdentityFile ~/.ssh/id_ecdsa\n\n".format(
3355+
global_identity_block = "Host *\n ConnectTimeout 10\n ConnectionAttempts 3\n IdentityFile {}\n IdentityFile ~/.ssh/id_rsa\n IdentityFile ~/.ssh/id_ed25519\n IdentityFile ~/.ssh/id_ecdsa\n\n".format(
33563356
hostid_file,
33573357
)
33583358

33593359
def build_ssh_host_config(host_aliases):
33603360
host_spec = " ".join(str(x) for x in host_aliases if x)
3361-
host_block = "Host {}\n StrictHostKeyChecking no\n UserKnownHostsFile {}\n User {}\n HostName localhost\n Port {}\n".format(
3361+
host_block = "Host {}\n StrictHostKeyChecking no\n UserKnownHostsFile {}\n ConnectTimeout 10\n ConnectionAttempts 3\n User {}\n HostName localhost\n Port {}\n".format(
33623362
host_spec,
33633363
SSH_KNOWN_HOSTS_NULL,
33643364
vm_user,

0 commit comments

Comments
 (0)