这里xshell用的是ssh连接,所以问题一定出在ssh配置文件上!

xshell连接虚拟机,出现SSH服务拒绝密码

 

vi /etc/ssh/sshd_config

修改配置

sshd_config文件,注意ssh_config是针对客户端的配置文件,而sshd_config是针对服务器端的配置文件

# Authentication:

LoginGraceTime 120

PermitRootLogin without passwd

StrictModes yes

改成

# Authentication:

LoginGraceTime 120

PermitRootLogin yes

StrictModes yes

 

重启ssh

systemctl restart sshd

重启虚拟机

reboot

xshell再次连接即可

 

相关文章:

  • 2021-05-10
  • 2022-12-23
  • 2021-11-28
  • 2021-08-28
  • 2021-08-17
猜你喜欢
  • 2021-04-19
  • 2022-12-23
  • 2021-06-05
  • 2021-11-05
  • 2021-11-18
  • 2021-08-01
相关资源
相似解决方案