1. 程式人生 > >ssh遠端登入伺服器時提示'Permission denied (publickey)'的解決辦法

ssh遠端登入伺服器時提示'Permission denied (publickey)'的解決辦法

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在沒有金鑰登入的情況下,禁用了密碼登入,故出現如上錯誤。