sudo passwd root设置了root密码后,还是不能登陆。
sudo passwd root
查看更多
允许root用户登录,需要编辑sshd_config:
sudo vim /etc/ssh/sshd_config
找到# Authentication项下的 PermitRootLogin prohibit-password改成PermitRootLogin yes
PermitRootLogin prohibit-password
PermitRootLogin yes
保存,然后重启ssh就可以:
sudo systemctl restart sshd
发布 问题
分享 好友
手机 浏览
回到 顶部