Generating an SSH Key Pair

ssh-keygen -t rsa -b 4096 -C "Your_Email"

You will be prompted with the following:

Enter file in which to save the key (/c/Users/user/.ssh/id_rsa):

Select a file location, or press "Enter" to use the default file location.

Enter passphrase (empty for no passphrase): Enter same passphrase again:

Entering a secure passphrase will create an additional layer of security.

Preventing anyone who gains access to the computer to use that key without the passphrase. However, it will require you to supply the passphrase anytime the SSH key is used.

💡 If you do not wish to add any password, just type “enter/return”

Screenshot 2024-08-10 at 3.52.58 AM.png

Git GitHub Add SSH

Go to GitHub, navigate to the top left corner, click your profile, and select: Settings:

Screenshot 2024-08-10 at 3.58.46 AM.png

Select "SSH and GPG keys"

Screenshot 2024-08-10 at 3.58.57 AM.png

Click the "New SSH key" button:

Screenshot 2024-08-10 at 3.59.20 AM.png

Now we will use the cat command to copy the public key:

cat ~/.ssh/id_rsa.pub
Screenshot 2024-08-10 at 4.09.27 AM.png

Copy the text marked in the green box

And paste it in the box shown

Screenshot 2024-08-10 at 4.11.25 AM.png

Click the "Add SSH key" button