ssh远程连接服务器报错 Permission denied (publickey,password)

现象

在这里插入图片描述
本地机器ssh连接服务器时,提示Permission denied (publickey,password)

[email protected]’s password:
Permission denied, please try again.
[email protected]’s password:
Permission denied, please try again.
[email protected]’s password:
[email protected]: Permission denied (publickey,password).

解决方法

遇到这样的情况,如果不是密码错误,并且服务器上的sshd服务已经开启,则需要修改服务器的配置文件/etc/ssh/sshd_config

PermitRootLogin yes
PubkeyAuthentication no
PasswordAuthentication yes

保存后重启sshd服务即可

sudo service sshd restart

发布了26 篇原创文章 · 获赞 2 · 访问量 1073

猜你喜欢

转载自blog.csdn.net/BakerTheGreat/article/details/104300128
今日推荐