Using SSH to connect to Github


May 22, 2022

Since github has introduced Personal Access Token (PAT) for security reasons, I find it extremely challenging to connect with github, using PAT, to maintain this blog. Github recommends PAT, however, I find SSH to be much more convenient.

The following blog post tries to support anyone who wishes to use SSH.

  1. Generating the public and private key (either on Linux or WSL on Windows)
ssh-keygen -t ed25519 -C "Description for you Reference"

Select all the defaults while creating the public key. It is recommended to define a passphrase.

  1. Activating ssh-agent
eval "$(ssh-agent -s)"
  1. Adding the key
ssh-add ~/.ssh/id_ed25519
  1. Copy the key and add to Github

Copy the public key using the following command and paste into github.

cat ~/.ssh/

The ssh public key has to be inserted into the setting section of github

  1. Check if ssh connection is established github