手机版
你好,游客 登录 注册
背景:
阅读新闻

ssh错误: Permission denied (publickey).

[日期:2013-10-01] 来源:Linux社区  作者:dihuo [字体:大 中 小]

12345678 [oldgirl@c6 ~]$ scp .ssh/authorized_keys test@10.0.0.182:/home/test/
The authenticity of host '10.0.0.182 (10.0.0.182)' can't be established.
RSA key fingerprint is 11:fa:8b:27:68:89:5c:83:b0:16:ea:4b:8b:41:4b:00.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.0.0.182' (RSA) to the list of known hosts.
Permission denied (publickey).
lost connection
[oldgirl@c6 ~]

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在没有密钥登录的情况下,禁用了密码登录,故出现如上错误。

相关阅读:

shell自动化配置Hadoop配置文件示例 http://www.linuxidc.com/Linux/2013-05/84915.htm

通过配置SSH深刻理解Puppet的语法及工作机制 http://www.linuxidc.com/Linux/2013-07/87882.htm

Ubuntu下SSH安装或设置 http://www.linuxidc.com/Linux/2013-07/87368.htm

SUSE启用SSH和FTP http://www.linuxidc.com/Linux/2010-08/28286.htm

使用SSH客户端登陆Linux之后出现乱码的解决方案 http://www.linuxidc.com/Linux/2010-08/28141.htm

详解Linux中SSH远程访问控制 http://www.linuxidc.com/Linux/2013-07/88048.htm

linux
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款