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