How to Setup SSH Passwordless Login in Linux
Today, We will learn how to set up ssh passwordless login in Linux. SSH (Secure SHELL) is an open-source and most trusted network protocol that is used to log in to remote servers for the execution of commands and programs.
Here is the step to Passwordless SSH login:
Step 1: Generate ssh-keygen on source machine
$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/eduguru/.ssh/id_rsa): [Press enter key]
Created directory '/home/eduguru/.ssh'.
Enter passphrase (empty for no passphrase): [Press enter key]
Enter same passphrase again: [Press enter key]
Your identification has been saved in /home/eduguru/.ssh/id_rsa.
Your public key has been saved in /home/eduguru/.ssh/id_rsa.pub.
The key fingerprint is:
5f:ad:40:00:8a:d1:9b:99:b3:b0:f8:08:99:c3:ed:d3 eduguru@eduguru.in
The key's randomart image is:
+--[ RSA 2048]----+
| ..oooE.++|
| o. o.o |
| .. . |
| o . . o|
| S . . + |
| . . . o|
| . o o ..|
| + + |
| +. |
+-----------------+
Step 2: Copy the ssh id to the remote host
$ ssh-copy-id root@192.168.0.112
Step 3: Test the passwordless SSH Login
$ ssh root@192.168.0.112
Pingback: Homepage