美文网首页
Xshell root连接时显示ssh服务器拒绝解决方案

Xshell root连接时显示ssh服务器拒绝解决方案

作者: Cookie_hunter | 来源:发表于2018-03-20 15:44 被阅读0次

当使用Xshell ``root连接时显示ssh服务器拒绝了密码,应该是sshd的设置不允许root用户用密码远程登录

修改/etc/ssh/sshd_config文件,注意,安装了openssh才会有这个文件,如果文件不存在请检查是否安装了openssh

vim /etc/ssh/sshd_config

找到

# Authentication:
LoginGraceTime 120
PermitRootLogin prohibit-password
StrictModes yes

将上文改成

# Authentication:
LoginGraceTime 120
PermitRootLogin yes
StrictModes yes

然后输入命令

/etc/init.d/ssh restart 

重启ssh服务即可。

相关文章

网友评论

      本文标题:Xshell root连接时显示ssh服务器拒绝解决方案

      本文链接:https://www.haomeiwen.com/subject/igcrqftx.html