API: fix online check

This commit is contained in:
Johannes Kirschbauer
2024-08-26 18:00:41 +02:00
parent 3b48dfd2e0
commit b7c70cd058

View File

@@ -103,10 +103,13 @@ def check_machine_online(
"ssh", "ssh",
*(["-i", f"{opts.keyfile}"] if opts and opts.keyfile else []), *(["-i", f"{opts.keyfile}"] if opts and opts.keyfile else []),
# Disable strict host key checking # Disable strict host key checking
"-o StrictHostKeyChecking=no", "-o",
"StrictHostKeyChecking=no",
# Disable known hosts file # Disable known hosts file
"-o UserKnownHostsFile=/dev/null", "-o",
f"-o ConnectTimeout={timeout}", "UserKnownHostsFile=/dev/null",
"-o",
f"ConnectTimeout={timeout}",
f"{hostname}", f"{hostname}",
"true", "true",
"&> /dev/null", "&> /dev/null",