歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> ssh錯誤: Permission denied (publickey).

ssh錯誤: Permission denied (publickey).

日期:2017/2/28 14:43:15   编辑:Linux教程

12345678 [oldgirl@c6 ~]$ scp .ssh/authorized_keys [email protected]:/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在沒有密鑰登錄的情況下,禁用了密碼登錄,故出現如上錯誤。

Copyright © Linux教程網 All Rights Reserved