How to create SSH-key with Ubuntu 20.04 LTS

SSH-keys are used to identify a client during the connection to an SSH-protocol server. Use this method instead of password authentication. 

Introduction

If you have worked with Git on Windows previously, there is a 99% probability that it asks the password every time while using the standard commands. It is very irritating and decreases productivity. The creation of the ssh-key resolves this issue on Ubuntu.

Creating ssh-key

This instruction is for the clean Ubuntu.

1.  Installing xclip

sudo apt install xclip

2. Creating ssh-key:

ssh-keygen -t rsa -C “your.email@example.com” -b 4096

3. Copying your key and pasting it into the Git field using this command:

xclip -sel clip < ~/.ssh/id_rsa.pub
P.S. The password will be asked if you have copied the repository with https. Copy it again with ssh, and it will not ask you to enter the password again. 

Related Articles

Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments