fix known_hosts ownership, ssh dir creation, and root user guard

This commit is contained in:
Justin Oros committed 2026-04-16 09:22:19 -07:00
1 parent 7bdafd316c
commit 87c08fb543
2 files changed
+8 -1

No files matched your search

+2 -1
View File
@@ -100,9 +100,10 @@ case "$KEY_CHOICE" in
esac
info "Scanning hub host key..."
sudo -u armbian ssh-keyscan -H "$HUB_HOST" >> "$SSH_DIR/known_hosts" 2>/dev/null
sudo -u armbian touch "$SSH_DIR/known_hosts"
chown armbian:armbian "$SSH_DIR/known_hosts"
chmod 600 "$SSH_DIR/known_hosts"
sudo -u armbian ssh-keyscan -H "$HUB_HOST" >> "$SSH_DIR/known_hosts" 2>/dev/null
header "Testing SSH Connection"
info "Testing connection to $HUB_HOST..."