SecureCRT无法连接Linux虚拟机,返回账号密码错误Password Authentication Failed

今天安装debian8虚拟机后,用securecrt通过ssh登录系统时返回登录账号密码错误,但是本人该账号密码可以在VMware成功登录系统。
错误信息如下:

Password Authentication Failed
Password authentication failed.Please verify that the username and password are correct.

SecureCRT无法连接Linux虚拟机,返回账号密码错误Password Authentication Failed_第1张图片

在端口号,IP地址,防火墙都确认没有问题的情况,后来发现原来是ssh的配置文件出问题了,解决方法:

#进入目录
cd /etc/ssh/
vim sshd_config
#找到PermitRootLogin without-password
#将without-password修改为yes
#重启ssh服务
service ssh restart
#再用securecrt就能成功登录

SecureCRT无法连接Linux虚拟机,返回账号密码错误Password Authentication Failed_第2张图片

这里写图片描述

SecureCRT无法连接Linux虚拟机,返回账号密码错误Password Authentication Failed_第3张图片

查了下资料,找到下面一段话

PermitRootLogin

Specifies whether root can log in using ssh(1). The argument must be “yes”, “without-password”, “forced-commands-only”, or "no”. The default is “yes”.

If this option is set to “without-password”, password authentication is disabled for root.

If this option is set to “forced-commands-only”, root login with public key authentication will be allowed, but only if the  command option has been specified (which may be useful for taking remote backups even if root login is normally not allowed). All other authentication methods are disabled for root.

If this option is set tono”, root is not allowed to log in.

意思说,如果PermitRootLogin设置为without-password后,密码验证对于root用户是无效,所以导致securecrt无法登录。

学艺不精,如觉有异,欢迎指正正及交流。

你可能感兴趣的:(securecrt,linux,debian,Linux)