SSH服务器拒绝了密码,xshell连不上虚拟机怎么办

在物理机上连接虚拟机上的kali linux 系统,出现上图中的错误,这是sshd的设置不允许root用户用密码远程登录

解决方案:

修改 vi /etc/ssh/sshd_config

找到# Authentication:
LoginGraceTime 120

#PasswordAuthentication no的注释去掉,并且将no修改为yes

#PermitRootLogin prohibit-password的注释去掉 ,prohibit-password 改为yes

改成

# Authentication:
LoginGraceTime 120
PermitRootLogin yes
StrictModes yes

重新ssh服务器:sudo  /etc/init.d/ssh  restart

  1. 重新连接接xshell
发布了36 篇原创文章 · 获赞 8 · 访问量 3万+

猜你喜欢

转载自blog.csdn.net/weixin_41965172/article/details/85690981