Update bootstrap.sh
This commit is contained in:
@@ -22,11 +22,11 @@ else
|
||||
echo "PermitRootLogin yes" >> "$SSHD_CONFIG"
|
||||
fi
|
||||
|
||||
# Ensure PasswordAuthentication no
|
||||
# Ensure PasswordAuthentication yes
|
||||
if grep -qE '^\s*PasswordAuthentication' "$SSHD_CONFIG"; then
|
||||
sed -i 's/^\s*PasswordAuthentication.*/PasswordAuthentication no/' "$SSHD_CONFIG"
|
||||
sed -i 's/^\s*PasswordAuthentication.*/PasswordAuthentication yes/' "$SSHD_CONFIG"
|
||||
else
|
||||
echo "PasswordAuthentication no" >> "$SSHD_CONFIG"
|
||||
echo "PasswordAuthentication yes" >> "$SSHD_CONFIG"
|
||||
fi
|
||||
|
||||
echo "Restarting SSH service..."
|
||||
|
||||
Reference in New Issue
Block a user