[damobao@localhost ssh]$ su
Password:
[root@localhost ssh]# 编辑文件设置 允许远程登录 Root
vi /etc/ssh/sshd_config找到#PermitRootLogin yes,去掉注释,:wq!保存
#LoginGraceTime 2m
PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10
最后重启服务生效
systemctl restart sshd提示:如遇链接失效,请在评论区留言反馈