**Step 1: Check for SSH Keys**
`ls -al ~/.ssh`
_# Lists all the files in your .ssh directory, if they exist
Generating public/private rsa key pair_
**Step 2: Generate a new SSH key**
`ssh-keygen -t rsa -b 4096 -C "email@email.com"`
_# Creates a new ssh key, using the provided domain username and computer name as a label
Generating public/private rsa key pair._
You’ll be asked to enter a passphrase, or simply press Enter to not enter a passphrase:
` Enter passphrase (empty for no passphrase):`
`Enter same passphrase again:`
After you enter a passphrase (or just press Enter twice), review the fingerprint, or ‘id’ of your SSH key:
`Your identification has been saved in /Users/username/.ssh/id_rsa.`
`Your public key has been saved in /Users/username/.ssh/id_rsa.pub.
`
`The key fingerprint is:`
`nss2VhNB0Y62VIToM+/qYe3HS4TPXmrhuBxjUz4l/I8= your@email.com`
**Step 3: Add your key to the ssh-agent**
`start the ssh-agent in the background`
`eval $(ssh-agent -s)`
If you are using Git Bash, turn on the ssh-agent with command shown below instead:
_start the ssh-agent in the background_
Then, add your SSH key to the ssh-agent:
`ssh-add ~/.ssh/id_rsa`
**Step 4: Add your SSH key to the server**
`cat ~/.ssh/id_rsa.pub | ssh username@server.address.com 'cat >> ~/.ssh/authorized_keys'`