Set Up SSH Keys
January 3, 2012 Leave a comment
We use SSH keys to establish a secure connection between your computer and GitHub. Setting them up is fairly easy, but does involve a number of steps.
To make sure you generate a brand new key, you need to check if one already exists. First, you need to open an app called Terminal.
1. First, check for existing ssh keys on your computer:
cd ~/.ssh
2. Backup and remove existing SSH keys. Since there is already an SSH directory you’ll want to back the old one up and remove it:
$ ls $ mkdir key_backup $ cp id_rsa* key_backup $ rm id_rsa*
3. Generate a new SSH key. To generate a new SSH key, enter the code below. We want the default settings so when asked to enter a file in which to save the key, just press enter.
$ ssh-keygen -t rsa -C "your_email@youremail.com"
Now you need to enter a passphrase.
Enter passphrase (empty for no passphrase): Enter same passphrase again: