Let's Work

Mokhele Katleho

27 Jan 2023 · 2 min read

How to setup your GitHub SSH Keys in 3 easy steps

Are you tired of having to repeatedly input your username and password everytime when you try to access github?or maybe you just want a more secure and convenient way to be authenticated when accessing your github? If your answer is yes then Secure Shell Keys(SSH-Keys) are a solution to this problem. In this blog I will be guiding you through the process of setting up SSH Keys on github







Step 1 : Check for existing SSH Keys

Before you generate your SSH key, you should start by checking if you don't already have an existing key; You can do this by running the following command on your terminal:

ls -al ~/.ssh

If you have any existing SSH keys this command will list them,if you don't have any existing SSH keys don't worry, just follow along.

Step 2 : Generate a New SSH Key

If you don't have an existing SSH key, you can easily generate one by running the following command:

ssh-keygen -t rsa -b 4096 -C "your email" 

After running this command you will be prompted to enter the file name and the passphrase for the new SSH key, you can just click enter to use the default filename(id_rsa) and the passphrase is optional if you want some extra security.

Step 3 : Add the SSH Key to your github account

After your SSH key has been successfully generated, you will now have to add it to your github account. Login to your github account and go to your account settings, then click on the "SSH and GPG Keys" tab; see screenshot below.

After that now click the "Add new SSH key" button and give your new SSH key a title, the title can be anything you like. Next copy the key from the "id_rsa.pub" file located in your "~/.ssh" folder and paste it into the "Key" field. The ssh folder was created when you generated your new SSH key and this is where your key is stored. Please note that the 'ssh' folder might be hidden by default,if this is the case for you just simply click on the "show hidden files" checkbox under the views tab on your taskbar:

Now finally, if you successfully copied your SSH Key to your github, click the "Add SSH key" button.


SSH keys provide a secure and convenient way to authenticate your access when using github. By following the steps from this article, you will be able to easily setup your SSH keys.

More Articles

Unlocking the power of JWT : A developer guide

Hey there, fellow tech enthusiasts! Today, I want to dive into the world of JSON Web Tokens, or JWTs for short, and explore why they're a crucial part of moder…







14 Oct 2023 · 2 min read