ssh远程登录服务器时提示'Permission denied (publickey)'的解决办法

谁借莪1个温暖的怀抱¢ 2022-08-05 07:53 551阅读 0赞

scp远程拷贝文件时提示错误:
Warning: Permanently added ‘10.0.0.182’ (RSA) to the list of known hosts.
Permission denied (publickey).
解决:
登录10.0.0.182,将/etc/ssh/sshd_config文件中的PasswordAuthentication no 改为PasswordAuthentication yes

重启sshd服务:/etc/init.d/sshd restart
问题解决。
原因:scp是基于ssh的拷贝服务,ssh在没有密钥登录的情况下,禁用了密码登录,故出现如上错误。

发表评论

表情:
评论列表 (有 0 条评论,551人围观)

还没有评论,来说两句吧...

相关阅读