Change PermitRootLogin to yes

even if it's commented out
This commit is contained in:
Christopher
2023-10-25 21:07:41 -05:00
parent 274bae2e88
commit 0963a65074

View File

@@ -12,7 +12,7 @@ passwd root
# Enable SSH root login
echo "Enabling SSH for root..."
sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config
sed -i -e 's/^#\s*PermitRootLogin.*/PermitRootLogin yes/' -e 's/^\s*PermitRootLogin no/PermitRootLogin yes/' /etc/ssh/sshd_config
# Restart the SSH service
echo "Restarting SSH service..."