Getting Keyed Up
Author: Stu FeeserWe need RSA keys in place to run the next series of labs.
Tasks:
-
Install an id+rsa keypair. It is OK to answer NO if the key already exists.
$
ssh-keygen
-
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. -
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. -
Back in GitHub, click on your profile icon on the top-right corner.
-
Select Settings from the drop down menu.
-
Select SSH and GPG Keys on the left. NOTE: You should have as few keys as possible, ideally one (the one we’re entering).
-
Click the green New SSH Key button.
-
Paste the key from your clipboard into GitHub.
-
Click the Add button.
-
You’ll likely need to input your GitHub password to complete adding a new SSH Key.
-
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.
-
Confirm that your new key is now in GitHub.
$
curl https://github.com/sfeeser.keys