-
-
Save malohtie/a2c708cc6fa022c6bac040804af20aca to your computer and use it in GitHub Desktop.
Enable password login to your ssh server (redhat)
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
#!/bin/bash | |
sed -i 's/#Port 22/Port 22/g' /etc/ssh/sshd_config; | |
sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config; | |
sed -i 's/#PermitRootLogin yes/PermitRootLogin yes/g' /etc/ssh/sshd_config; | |
sed -i 's/PermitRootLogin without-password/#PermitRootLogin without-password/g' /etc/ssh/sshd_config; | |
echo root:yourpassword | chpasswd; | |
service sshd restart; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment