Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shijiezhou1/c2ac6836c223819b3ae589abc2caeb50 to your computer and use it in GitHub Desktop.
Save shijiezhou1/c2ac6836c223819b3ae589abc2caeb50 to your computer and use it in GitHub Desktop.
Update Cloud Username and Password
#!/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
@shijiezhou1
Copy link
Author

run passwd to change new password

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment