Cleanup after merge; pauls ssh key now works for vpn.:
This commit is contained in:
+6
-6
@@ -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",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user