美文网首页
Xshell连接虚拟机时,提示SSH服务器拒绝了密码

Xshell连接虚拟机时,提示SSH服务器拒绝了密码

作者: 小河土 | 来源:发表于2018-07-01 17:02 被阅读0次

首先,开启ssh服务,执行以下命令:/etc/init.d/ssh start    或 service sshd start

然后ifconfig查看其ip地址,当Xshell连接虚拟机时,提示:SSH服务器拒绝了密码。请再试一次。

sshd的设置不允许root用户用密码远程登录

修改 vim /etc/ssh/sshd_config

  找到# Authentication:  

 LoginGraceTime 120  

 PermitRootLogin without passwd  

 StrictModes yes

改成

  # Authentication:  

 LoginGraceTime 120  

 PermitRootLogin yes  

 StrictModes yes  重启虚拟机

相关文章

网友评论

      本文标题:Xshell连接虚拟机时,提示SSH服务器拒绝了密码

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