Getting Keyed Up

Author: Stu Feeser

We need RSA keys in place to run the next series of labs.

Tasks:

  1. Install an id+rsa keypair. It is OK to answer NO if the key already exists.

    $ ssh-keygen

  2. Note that ssh-keygen created TWO keys, one private, the other public. Take a look at both of them:

    $ cat ~/.ssh/id_rsa This is the PRIVATE key. It effectively is your password. NEVER share this with anyone.

    $ cat ~/.ssh/id_rsa.pub This is your PUBLIC key. You can place it anywhere.

  3. Next we’ll want to copy your public RSA key. Run this command and COPY the output with your mouse.

    $ cat ~/.ssh/id_rsa.pub Then copy the key with your mouse.

  4. Back in GitHub, click on your profile icon on the top-right corner.

  5. Select Settings from the drop down menu.

  6. Select SSH and GPG Keys on the left. NOTE: You should have as few keys as possible, ideally one (the one we’re entering).

  7. Click the green New SSH Key button.

  8. Paste the key from your clipboard into GitHub.

  9. Click the Add button.

  10. You’ll likely need to input your GitHub password to complete adding a new SSH Key.

  11. Check your email and confirm that your key has been added. If your key was formatted incorrectly, it will be rejected immediately or via email.

  12. Confirm that your new key is now in GitHub.

    $ curl https://github.com/sfeeser.keys