fix double brace artifacts and missing SSHD_CONF in setup-spoke.sh
This commit is contained in:
1 parent
3d366cd74a
commit
7e64156026
1 file changed
+4
-2
@@ -123,10 +123,12 @@ else
|
|||||||
warn "Could not enable SSH service — please start it manually."
|
warn "Could not enable SSH service — please start it manually."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
SSHD_CONF="/etc/ssh/sshd_config"
|
||||||
|
|
||||||
header "Password Authentication"
|
header "Password Authentication"
|
||||||
read -rp "Disable password auth for $SPOKE_USER and use keys only? [Y/n]: " DISABLE_PASS
|
read -rp "Disable password auth for $SPOKE_USER and use keys only? [Y/n]: " DISABLE_PASS
|
||||||
DISABLE_PASS="${{DISABLE_PASS:-y}}"
|
DISABLE_PASS="${DISABLE_PASS:-y}"
|
||||||
if [[ "${{DISABLE_PASS,,}}" == "y" ]]; then
|
if [[ "${DISABLE_PASS,,}" == "y" ]]; then
|
||||||
if [ ! -s "$SSH_DIR/authorized_keys" ]; then
|
if [ ! -s "$SSH_DIR/authorized_keys" ]; then
|
||||||
warn "No keys found in $SSH_DIR/authorized_keys — skipping password auth disable to avoid lockout."
|
warn "No keys found in $SSH_DIR/authorized_keys — skipping password auth disable to avoid lockout."
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in new issue
Block a user