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