Add valid permissions on .ssh folder and key files in *nix systems

To enable Linux/BSD systems to correctly work with you ssh keys - you need to set valid permissions for that files.

Typically you want the permissions to be:

Shortcut script to make that works

This few commands works for me:

chmod 0700 ~/.ssh 
chmod 0644 ~/.ssh/*.pub
chmod 0600 ~/.ssh/id_rsa ~/.ssh/github_rsa
Tags: #unix , Created: 16. 8. 2022
Created by Martin Krizan (2022)