#!/bin/bash
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 reboot
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
暂无评论内容