创建实例的时候把下面这段代码粘贴进Add launch script那里就可以直接root密码登录了,dog886改成自己的密码。也适用于甲骨文。
#!/bin/bash echo root:dog886 |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
评论列表(2条)
Awesome post! Keep up the great work! 🙂
Thank you