This post was updated 633 days ago and some of the ideas may be out of date.
- 使用秘钥连接ssh
- 输入
sudo -i开启root权限 - 输入
vim /root/.ssh/authorized_keys - 删除
ssh-rsa前面所有内容 - 输入
vim /etc/ssh/sshd_config - 将
#PermitRootLogin改成PermitRootLogin yes - 将
#PasswordAuthentication改成PasswordAuthentication yes - 输入
passwd,输入两次新密码。 - 输入
reboot重启即可
参与讨论