2 Simple Steps to Set Up SSH Public Key Authentication on CentOS

LinuxBabe
Jan 22, 2021

--

This tutorial explains how to set up SSH public key authentication on a CentOS/RHEL desktop. There’re basically two ways of authenticating user login with OpenSSH server: password authentication and public key authentication. The latter is also known as passwordless SSH login because you don’t need to enter your password.

Step 1: Generate SSH Public/Private Key Pair on CentOS/RHEL Desktop

On your CentOS/RHEL desktop (not your server), enter the following command in a terminal window.

ssh-keygen -t rsa -b 4096

Where:

  • -t stands for type. The above command generates an RSA type keypair. RSA is the default type.
  • -b stands for bits. By default, the key is 3072 bits long. We use a 4096 bits key for stronger security.

Read full tutorial here: https://www.linuxbabe.com/redhat/generate-centos-ssh-public-key

--

--

No responses yet