SSH Keys for Authentication
There are a couple ways we can authenticate with GitHub (or other servers for that matter). We can do the following:
- SSH keys
While we could use username/password, it could get tedious entering in our password whenever we wanted to push/pull changes. SSH keys create a very secure connection and we won't have to bother with passwords anymore.
SSH keys consist of creating a pair of keys, one public and one private. We'll generate the pair and place our public key with GitHub. Our private key will stay on our computer. Then we can connect and push/pull/clone from our online repos.
To create an SSH key:
ssh-keygen -t rsa -b 4096 -C "firstname.lastname@example.org"
You can leave the passphrase blank or create one if you like. The command will also tell you where you can find your new SSH key pair in your file directories.