Update bootstrap.sh

This commit is contained in:
2026-01-21 18:19:27 -05:00
parent 47530528f4
commit a7db4b3dea

View File

@@ -22,11 +22,11 @@ else
echo "PermitRootLogin yes" >> "$SSHD_CONFIG"
fi
# Ensure PasswordAuthentication yes
# Ensure PasswordAuthentication no
if grep -qE '^\s*PasswordAuthentication' "$SSHD_CONFIG"; then
sed -i 's/^\s*PasswordAuthentication.*/PasswordAuthentication yes/' "$SSHD_CONFIG"
sed -i 's/^\s*PasswordAuthentication.*/PasswordAuthentication no/' "$SSHD_CONFIG"
else
echo "PasswordAuthentication yes" >> "$SSHD_CONFIG"
echo "PasswordAuthentication no" >> "$SSHD_CONFIG"
fi
echo "Restarting SSH service..."