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",
*(["-i", f"{opts.keyfile}"] if opts and opts.keyfile else []),
# Disable strict host key checking
"-o StrictHostKeyChecking=no",
"-o",
"StrictHostKeyChecking=no",
# Disable known hosts file
"-o UserKnownHostsFile=/dev/null",
f"-o ConnectTimeout={timeout}",
"-o",
"UserKnownHostsFile=/dev/null",
"-o",
f"ConnectTimeout={timeout}",
f"{hostname}",
"true",
"&> /dev/null",