Password less login SSH CentOs & RedHat
Secure Shell (SSH)
SSH is a cryptographic network protocol for secure data communication, remote command-line login, remote command execution, and other secure network services between two networked computers. It connects, via a secure channel over an insecure network, a server and a client running SSH server and SSH client programs, respectively. The protocol specification distinguishes between two major versions that are referred to as SSH-1 and SSH-2.
Follow the steps to create the password less login.
Here We have two server’s
Server IP: 172.16.60.24
Server IP: 172.16.60.19
Now logged in server 172.16.60.19 and create a pair of keys by using following command.
Note : Press Enter key while enter pass phrase.
Once you have created, you will find two files inside the .ssh directory. id_rsa and id_rsa.pub.
We have to copy theses files on client machine.
Use ssh-copy-id command with input file of id_rsa.pub
It will create /root/.ssh/authorized.keys if not present.
# ssh-copy-id -i id_rsa.pub email@example.com
Now you can access remote machine without using password.