123456789101112131415161718192021 |
- #!/bin/bash
- sed -i "s/PermitRootLogin.*/PermitRootLogin yes/g" /etc/ssh/sshd_config
- sed -i "s/#PermitRootLogin.*/PermitRootLogin yes/g" /etc/ssh/sshd_config
- sed -i "s/PasswordAuthentication.*/PasswordAuthentication yes/g" /etc/ssh/sshd_config
- systemctl restart ssh
- Green="\033[32m" && Red="\033[31m" && GreenBG="\033[42;37m" && RedBG="\033[41;37m" && Font="\033[0m"
- echo -e "${Red}如果需要修改root密码,请输入命令${GreenBG} passwd ${Font}${Green} 修改用户密码! ${Font}"
- echo
|