I don’t know how many times I have done this, and every time don’t remember the commands to do it.
So this post it’s to explain it and to have it for laters formats or new installations.
As a first step “Create the directory for the SSH Keys”
Now change the permissions to just you
chmod 700 ~/.ssh
Now generate a new key, by default it will generate the keys into the previous created directory
ssh-keygen -t rsa -b 4096
It will prompt for a passphrase just type something secure. This passphrase will protect your SSH Keys
And now you have a Key Pair to use with GitHub, SSH on other PCs or a Server.