Home Affiliates Marketing Domains Marketing Web Servers Sign Up

aws输入命令就能root密码登录的代码

 echo root:密码 |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