Last active
May 16, 2018 17:29
-
-
Save sumitsaiwal/3dbc2fe058712a2a4b8e7c13184f472f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo sed -i 's/PermitRootLogin prohibit-password/#PermitRootLogin prohibit-password/g' /etc/ssh/sshd_config | |
sudo sed -i 's/PasswordAuthentication no/#PasswordAuthentication no/g' /etc/ssh/sshd_config | |
sudo sed -i '$ a PermitRootLogin yes' /etc/ssh/sshd_config | |
sudo sed -i '$ a PasswordAuthentication yes' /etc/ssh/sshd_config | |
sudo sed -i '$ a PermitRootLogin without-password' /etc/ssh/sshd_config | |
echo PASSWORD | sudu passwd | |
sudo service ssh restart (ubuntu) | |
sudo service sshd restart (rhel) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment