How to Setup SSH Passwordless Login in RHEL 8

With the release of RHEL 8 Beta, you get to experience what the real product will be like and test some of its functionalities. If you are eager to test RHEL 8 you can...

Spread the love

With the release of RHEL 8 Beta, you get to experience what the real product will be like and test some of its functionalities. If you are eager to test RHEL 8 you can signup for free and download RHEL 8 beta.

You can review our RHEL 8 installation tutorial on the link below.

  1. Installation of “RHEL 8” with Screenshots

To easily understand this, I will be using two servers:

  • 192.168.20.100 (kerrigan) – server from which I will be connecting
  • 192.168.20.170 (tecmint) – my RHEL 8 system

In this tutorial, you are going to learn how to setup passwordless SSH login on your RHEL 8 install using ssh keys. Open-ssh server should already be installed on your system, but in case it is not, you can install it by issuing the following command:

# yum install openssh-server

Step 1: Generate SSH Key on 192.168.20.100 (kerrigan)


On the system, from where you will be connecting to your RHEL 8 system, generate a new ssh key pair. This can be done by using the following command:

# ssh-keygen

You can configure a meaningful name for the file or just leave it to the default one. When asked for a passphrase, simply press “enter” and leave the password empty.

Generate SSH Keys on RHEL 8

Generate SSH Keys on RHEL 8

Step 2: Copy SSH Key to 192.168.20.170 (tecmint)

Copying the key is a simple task and that can be completed by using ssh-copy-id command as shown.

# ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected]

When prompted for the remote user’s password, simply enter it. This will create the “.ssh” directory if missing and the authorized_keys file with appropriate permissions.

Copy SSH Key to RHEL 8

Copy SSH Key to RHEL 8

Step 2: Test SSH Passwordless Login from 192.168.20.100

Now that we have the key copied to our remote server, we can test the connection. You should not be asked for password:

# ssh -i ~/.ssh/id_rsa [email protected]

Test SSH Passwordless Login

Test SSH Passwordless Login

In this tutorial you learned how to SSH to your RHEL 8 system using passwordless ssh key. I hope the process was easy. If you have any questions, please post them in the comment section below.

Facebook Comments

More Stuff

Installing CentOS 7.1 Dual Boot With Windows 8.1 on UEFI Firmware ... This tutorial discusses the installation of CentOS 7.1 in dual-boot with Windows 8.1 on UEFI Firmware machines that comes pre-installed with Windows O...
How to Configure Nginx as Reverse Proxy for Nodejs App Nodejs is a free open source, lightweight, scalable and efficient JavaScript framework built on Chrome’s V8 JavaScript engine, and uses an event-drive...
How to Install vnStat and vnStati to Monitor Network Traffic in RH... VnStat is a console based network traffic monitoring tool design for Linux and BSD. It will keep a log of the network traffic for a selected network i...
Deal: Learn Linux Administration and Supercharge Your Career ($19) With many companies, organizations, governments and individuals turning towards open-source solutions and importantly, Linux leading the way in open-s...
Spread the love

Posted by News Monkey