Xshell连接Kali Linux时提示ssh服务器拒绝了密码,请再试一次

用Xshell root连接时显示ssh服务器拒绝了密码,应该是应该是sshd的设置不允许root用户用密码远程登录 
修改 /etc/ssh/sshd_config文件,注意,安装了openssh才会有这个文件,如果文件不存在请检查是否安装了openssh。

vim /etc/ssh/sshd_config
  • 1
  • 1

找到

# Authentication:
LoginGraceTime 120
PermitRootLogin prohibit-password
StrictModes yes
  • 1
  • 2
  • 3
  • 4
  • 5
  • 1
  • 2
  • 3
  • 4
  • 5

改成

# Authentication:
LoginGraceTime 120
PermitRootLogin yes
StrictModes yes
  • 1
  • 2
  • 3
  • 4
  • 1
  • 2
  • 3
  • 4

然后输入命令

service ssh restart 
  • 1
  • 1

重启ssh服务即可。

猜你喜欢

转载自blog.csdn.net/reality_fei/article/details/73481375