aws light 默认开机没有 sudo 权限,无法使用 sudo
1
2
3
4
5
|
#!/bin/bash
echo root:AwsPass@100 |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 reboot
|