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 systemctl restart sshd
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END