From the course: Red Hat Enterprise Linux 8 Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Configure key-based authentication

Configure key-based authentication

From the course: Red Hat Enterprise Linux 8 Essential Training

Start my 1-month free trial

Configure key-based authentication

- [Narrator] There are multiple ways of authenticating using SSH, but the two most common are passwords and private-public key pairs. For this exercise we're going to need both of our VMs booted up and you'll need the IP address of RH Host Two VM. To set up password-less logins, I need to generate the SSH key pair using the SSH key gen command in the RH Host One VM. In a terminal in your RH Host One VM, type in ssh-keygen and hit Enter. Go ahead and take the defaults when prompted. Since we did not pass it any options, it created rsa private and public keys. Let's verify this by listing the .ssh hidden directory. Type in clear and type in ls, space, dash, l, space, tilde, slash, dot, ssh, and hit Enter. We can see that we have a file called id underscore rsa. That is our private key. And we have a file called id underscore rsa dot pub, which is our public key. Let's view the public key with cat. Type in cat, space, tilde, slash, .ssh, slash, id, underscore, rsa.pub and hit Enter. Now…

Contents