Before you generate an SSH key, you can check to see if you have any existing SSH keys.
1. Open Terminal
2. Enter ls -al ~/.ssh
to see if existing SSH keys are present. This lists the files in your .ssh directory, if they exist. Check the directory listing to see if you already have a public SSH key.
If you don't have an existing public and private key pair, or don't wish to use any that are available to connect to GitHub, then generate a new SSH key.
If you receive an error that ~/.ssh doesnt exist, dont worry! We will create it when we generate a new SSH key.
After you've checked for existing SSH keys, you can generate a new SSH key to use for authentication
1. Open Terminal