[密鑰權限過大錯誤]ssh “permissions are too open” error


I had a problem with my mac where I couldn't save any kind of file on the disk anymore. I had to reboot OSX lion and reset the permissions on files and acls.

But now when I want to commit a repository I get the following error from ssh:

Permissions 0777 for '/Users/username/.ssh/id_rsa' are too open.
It is recommended that your private key files are NOT accessible by others.
This private key will be ignored.
What permissions levels should i give to the id_rsa file?

別人那邊拷貝過來的密鑰,很多時候無法直接登錄ssh,會報錯permissions are too open。
這個時候需要修改id_rsa的權限,一般修改為600就好。

Keys need to be only readable by you:

chmod 400 ~/.ssh/id_rsa
600 appears to be fine as well (in fact better in most cases, because you don't need to change file permissions to edit it).


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM