SSH Keys

Updated May 26, 2024
Created August 12, 2018


Generating a new SSH key

cd ~/.ssh/

ssh-keygen -t rsa -b 4096 -C "[email protected]"
Enter file in which to save the key (~/.ssh/id_rsa):
  > <client-name>_rsa # eg my-client_rsa

# hit enter twice for no passphrase

cat <client-name>_rsa.pub

# Copy paste the text printed out in
#   the terminal into your "Add a new SSH Key" window
#   in Bitbucket, Github, Gitlab, etc

Add to your SSH Config

This allows you to have multiple SSH keys configured for multiple clients, and automagically select the correct key when talking to the relevant server.

http://nerderati.com/2011/03/17/simplify-your-life-with-an-ssh-config-file/


Comments?