1.将用户和Shell环境一起切换成root身份
su - root
2.编辑sshd_config文件
vi /etc/ssh/sshd_config
3.修改配置
默认的Authentication区块
# Authentication:
#LoginGraceTime 2m
#PermitRootLogin prohibit-password
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10
修改为以下
# Authentication:
LoginGraceTime 120
#PermitRootLogin prohibit-password
PermitRootLogin yes
StrictModes yes
#MaxAuthTries 6
#MaxSessions 10
4.重启SSH服务
systemctl restart sshd.service
标签:sshd,Authentication,PermitRootLogin,ssh,Ubuntu,yes,root
From: https://www.cnblogs.com/fanqisoft/p/17367732.html