Created
July 1, 2020 13:40
-
-
Save shijiezhou1/c2ac6836c223819b3ae589abc2caeb50 to your computer and use it in GitHub Desktop.
Update Cloud Username and Password
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 | |
echo root:pass |sudo chpasswd root | |
sudo sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config; | |
sudo sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication yes/g' /etc/ssh/sshd_config; | |
sudo service sshd restart | |
# username: root | |
# password: pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
run passwd to change new password