Setup Github ssh key(Ubuntu)

Ankit Kumar Rajpoot
3 min readDec 30, 2020

An SSH key is an access credential for the SSH (secure shell) network protocol. This authenticated and encrypted secure network protocol is used for remote communication between machines on an unsecured open network. SSH is used for remote file transfer, network management, and remote operating system access.

Before starting this article, I am assuming that your GitHub account has set up on your machine. If your user is not set up you should follow this article.

There are some basic steps to setup ssh key:-

  1. Open Terminal.
  2. Paste the text below, substituting in your GitHub email address.
$ ssh-keygen -t ed25519 -C "your_email@example.com"
Generating public/private key

3. Start the ssh-agent in the background.

$ eval "$(ssh-agent -s)"
Start ssh-agent

4. Add your SSH private key to the ssh-agent.

$ ssh-add ~/.ssh/id_ed25519
Add key

Note:- After adding the key. You will have to locate the hidden .ssh folder, open the id_ed25519.pub file in your favorite text editor and copy it to your clipboard.

Add the SSH key to your GitHub account.

  1. In the upper-right corner of any page, click your profile photo, then click Settings.
Menu

2. In the user settings sidebar, click SSH and GPG keys.

SSH and GPG keys

3. Click New SSH key or Add SSH key.

New SSH key

4. Paste your key into the “Key” field.

Add SSH key

If it will ask userId and password for confirmation then you will have to enter.

After Adding

Now, you can perform your GitHub activities without userId and password.

That’s it for this time! I hope you enjoyed this post. As always, I welcome questions, notes, comments and requests for posts on topics you’d like to read. See you next time! Happy Coding !!!!!

--

--

Ankit Kumar Rajpoot

I’m a MERN Developer. ( Redux | AWS | Python ) I enjoy taking on new things, building skills, and sharing what I’ve learned.