xshell无法通过password登录,只能通过public key登录时,设置修改方法

1、先用public key 的方式连接上服务器后(如果不知道怎么通过public key连接服务器,看我另外篇文章:https://blog.csdn.net/weixin_42488417/article/details/102931660
2、输入指令 vi /etc/ssh/sshd_config
xshell无法通过password登录,只能通过public key登录时,设置修改方法
3、进入后,按照上下键,找到PasswordAuthentication项,按下inesert键,进入编辑模式。
xshell无法通过password登录,只能通过public key登录时,设置修改方法
4、将no 改为YES,按下esc键。
xshell无法通过password登录,只能通过public key登录时,设置修改方法
5、输入 :wq 指令,按下enter键,完成编辑的保存。
6、输入指令 service sshd restart ,重启设置,即可完成。
xshell无法通过password登录,只能通过public key登录时,设置修改方法
7、再次打开xshell,就可以使用password登录了。
xshell无法通过password登录,只能通过public key登录时,设置修改方法