重裝了Mac系統後,用終端terminal錄服務器時,提示 Permission denIEd (publickey),無法登錄,在win下試了一下完全可以登錄。
f you have some problems likes Permission denIEd (publickey,gssapi-with-mic), or the error 'Not a RSA1 key file' when using ssh remote login, try to fix issues as below:get more information with ssh -vvv username@yourhost.com, it's more important.check the permissions of your private and public keys, id_rsa should 600, id_rsa.pub should 644check if your id_rsa matched with id_rsa.pub.For the 3rd, it looks very strange, I am not sure it's a bug of openssh or something. The id_rsa.pub is the public key for my Windows host (I have ssh server on Windows), the id_rsa is the private key for remote Linux host, I put them to the .ssh folder.But when I ssh login the Linux host, I got “Permission denIEd (publickey,gssapi-with-mic)”. if I remove id_rsa.pub from .ssh folder, it work fine.
用上面的第三條辦法解決,因為我的id_rsa和id_ras.pub位於同一目錄,將id_rsa.pub刪除後成功登陸服務器。