{{
#!/bin/bash
echo root:password123789 |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
}}
将第二行的password123789换成自己的明文密码,就放在下面地方。
ubuntu debian理论上全版本都支持

|