forked from finn/tinyboard
setup-spoke.sh: change password auth disable default to N and add warning to wait until after onboard-spoke.sh
This commit is contained in:
@@ -237,8 +237,11 @@ case "$KEY_CHOICE" in
|
||||
esac
|
||||
|
||||
header "Password Authentication"
|
||||
read -rp "Disable password auth for $SPOKE_USER and use keys only? [Y/n]: " DISABLE_PASS
|
||||
DISABLE_PASS="${DISABLE_PASS:-y}"
|
||||
warn "Do not disable password auth yet — the hub still needs password access to install its key via ssh-copy-id."
|
||||
warn "Only disable this after running onboard-spoke.sh on the hub."
|
||||
echo ""
|
||||
read -rp "Disable password auth for $SPOKE_USER and use keys only? [y/N]: " DISABLE_PASS
|
||||
DISABLE_PASS="${DISABLE_PASS:-n}"
|
||||
if [[ "${DISABLE_PASS,,}" == "y" ]]; then
|
||||
if [ ! -f "$KEY_PATH" ]; then
|
||||
warn "No key found at $KEY_PATH — skipping password auth disable to avoid lockout."
|
||||
|
||||
Reference in New Issue
Block a user