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 should I give to the id_rsa file?
The keys need to be read-writable only by you:
Alternatively, the keys can be only readable by you (this also blocks your write access):
600appears to be better in most cases, because you don’t need to change file permissions later to edit it. (See the comments for more nuances)The relevant portion from the manpage (
man ssh)