clan: clan ssh fix for new installer image
All checks were successful
checks / checks-impure (pull_request) Successful in 1m59s
checks / checks (pull_request) Successful in 4m36s

This commit is contained in:
a-kenji 2024-04-17 18:20:40 +02:00
parent 22b767466c
commit 72811d0828

View File

@ -80,15 +80,15 @@ def is_reachable(host: str) -> bool:
def connect_ssh_from_json(ssh_data: dict[str, str]) -> None:
for address in ssh_data["local_addresses"]:
for address in ssh_data["addrs"]:
log.debug(f"Trying to reach host on: {address}")
if is_reachable(address):
ssh(host=address, password=ssh_data["password"])
ssh(host=address, password=ssh_data["pass"])
exit(0)
else:
log.debug(f"Could not reach host on {address}")
log.debug(f'Trying to reach host via torify on {ssh_data["onion_address"]}')
ssh(host=ssh_data["onion_address"], password=ssh_data["password"], torify=True)
log.debug(f'Trying to reach host via torify on {ssh_data["tor"]}')
ssh(host=ssh_data["tor"], password=ssh_data["pass"], torify=True)
def main(args: argparse.Namespace) -> None: