|chmod 700 ~/.ssh|
|chmod 644 ~/.ssh/authorized_keys|
|chmod 644 ~/.ssh/known_hosts|
|chmod 644 ~/.ssh/config|
|chmod 600 ~/.ssh/id_rsa|
|chmod 644 ~/.ssh/id_rsa.pub|
|chmod 600 ~/.ssh/github_rsa|
|chmod 644 ~/.ssh/github_rsa.pub|
|chmod 600 ~/.ssh/mozilla_rsa|
|chmod 644 ~/.ssh/mozilla_rsa.pub|
Something that has always mystified me...
If ~/.ssh is set to
So... I was about to follow suit here, and then remembered that there is always
Based on this excerpt, it is required that the .ssh directory be
Should be all you need.
Well, while this is probably a valid configuration for your user, you'll soon run into problems if your public-key files are not readable by applications and processes that possibly / often run in a different user context e.g. as a different "user" internally in the OS and needs to access your public keys for things like signing and / or verifying files using ssh.
The original gist has the most common and flexible enough permission setup, and is the way most systems, programmers and software expect the permissions to be set.
That should be
Beware that the man pages will vary from one version to another. For example, the man page on Ubuntu Bionic says:
Which would mean either
Overall, safer is better and you should lock the files down as much as possible for your environment.