利用脚本来开启root账号密码登录
echo root:S123456 |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
密码是: S123456(根据自己的修改)
文章介绍了如何使用脚本在Linux系统中修改SSH配置,允许root账号使用密码登录。步骤包括使用`sudopasswd`设置密码,以及在`sshd_config`中启用`PermitRootLogin`和`PasswordAuthentication`。
2169

被折叠的 条评论
为什么被折叠?



