mirror of
https://github.com/bigbeartechworld/big-bear-scripts.git
synced 2026-07-25 06:42:34 -04:00
Change PermitRootLogin to yes
even if it's commented out
This commit is contained in:
@@ -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..."
|
||||
|
||||
Reference in New Issue
Block a user