Introduction
In this article, we will explore the process of generating an SSH key in Ubuntu Server. SSH (Secure Shell) is a cryptographic network protocol that allows secure communication between two entities over an unsecured network. It is commonly used for remote login and secure file transfer.
Prerequisites
Before we begin, make sure you have the following:
- An Ubuntu Server installed and running
- A user account with sudo privileges
Generate SSH Key in Ubuntu
Syntax:
ssh-keygen -t rsa -b 4096 -C "your_email@domain.com"
Command:
ssh-keygen -t rsa -b 4096 -C "roshan.cotcous@gmail.com"
Now, you will see the following
Now, you can go “.ssh” folder and get ssh key from there:
cd ~/.ssh
/.ssh# ls -la
cat id_rsa.pub
Add SSH Key in Github Account
Upload public key https://github.com/settings/keys