SSH password-less Login
0. Node
- Gserver150 192.168.111.150
- Gserver151 192.168.111.151
- Gserver152 192.168.111.152
- Gserver153 192.168.111.153
1. Execute the ssh-keygen-t rsa command on each node
$ Ssh-keygen-t rsa
In ~ /. Generate the key id_sa and id_rsa.pub under ssh
2. append the id_rsa.pub file on each node to the ~ of gserver150 ~ /. Ssh/authorized_keys
$ Cat ~ /. Ssh/id_rsa.pub | ssh geobeans@192.168.111.150 "cat-> ~ /. Ssh/authorized_keys"
The appended authorized_keys file is
3. Copy the authorized_keys file on gserver150 to 151 ~ 153 ~ /. Ssh directory
$ Scp geobeans@192.168.111.150 :~ /. Ssh/authorized_keys ~ /. Ssh/
4. Change the authorized_keys permission to 600
$ Chmod 600 ~ /. Ssh/authorized_keys
Complete ssh password-less login configuration. Log on to another node on any node, for example, log on to gserver151 from gserver150.
$ Ssh 192.168.111.151
Enter the password for the first login. You do not need to enter the password after logging on to gserver151.
Configure SSH password-less logon in CentOS
Implement SSH password-less authentication login in Linux
How to configure SSH for Ubuntu and CentOS to enable password-less Login
This article permanently updates the link address: