Create SSH Key on Ubuntu Linux

Linux SSH Key Generation in Just Three Easy Steps

Maintaining a secure network between client and server machines is not always possible. To protect our server, we can use SSH to secure the connection.

SSH access credentials provide a secure protocol between client and server. Follow these steps to create an SSH key on Ubuntu Linux.

Step 1: Generate SSH Key

Open Terminal and run:

ssh-keygen -t rsa

When prompted for a save location, press Enter to accept the default.

Step 2: Set a Password

Choose a password for your login, or press Enter to skip. The private key (identification) and public key will be generated.

Step 3: View Public Key

Run:

cat ~/.ssh/id_rsa.pub

Copy the displayed public key from the terminal.