Cleanup after merge; pauls ssh key now works for vpn.:

This commit is contained in:
2026-05-27 09:52:50 +02:00
parent d517515219
commit 57ba52818c
+6 -6
View File
@@ -442,14 +442,14 @@ def step_add_ssh_key(iot_host: str):
"set -e\n"
"mkdir -p ~/.ssh\n"
"chmod 700 ~/.ssh\n"
"echo " + shlex.quote(ssh_key) + " >> ~/.ssh/authorized_keys\n"
"touch ~/.ssh/authorized_keys\n"
"chmod 600 ~/.ssh/authorized_keys\n"
"grep -qF " + shlex.quote(ssh_key) + " ~/.ssh/authorized_keys "
"|| echo " + shlex.quote(ssh_key) + " >> ~/.ssh/authorized_keys\n"
"echo 'SSH key for paul added successfully'\n"
)
ssh_cmd = ["ssh", "-p", str(SSH_PORT)]
if SSH_KEY:
ssh_cmd += ["-i", SSH_KEY]
ssh_cmd = ["ssh", "-p", str(SSH_PORT)] + _ssh_base_opts()
ssh_cmd += [f"{SSH_USER}@{iot_host}", remote]
proc = subprocess.run(ssh_cmd, check=False, capture_output=True, text=True)
@@ -509,7 +509,7 @@ def main():
ap.add_argument(
"--steps",
nargs="+",
choices=["pull", "wg", "hostname", "mac", "add_ssh_key", "update_app", "start_app", "finish", "all"],
choices=["pull", "wg", "hostname", "mac", "add_ssh_key", "system_update", "update_app", "start_app", "finish", "all"],
default=["all"],
help="Which steps to run. Default: all",
)