linux无法ssh连接

一、通过SSH提示“No supported authentication methods available (server sent: publickey,gssapi-keyex,gssapi-with-mic)”

 

 二、执行命令 vi /etc/ssh/sshd_config,按下 i 编辑SSH服务配置文件,将参数 PasswordAuthentication 设置为 yes,或者在 PasswordAuthentication 参数前添加井号(#),将PermitRootLogin yes

按下 Esc 退出编辑模式,并输入 :wq 保存退出。

 四、执行systemctl restart sshd

 

posted @ 2022-11-24 11:19  聆听城市喧哗  阅读(1101)  评论(0编辑  收藏  举报