Master and slave nodes in linux do not need to log in with each other.
Three nodes are installed, master,slave1,slave2
1. Master node key-free landing slave node
Enter ssh-keygen-t rsa in the host point window all the way back to the car.
two。 Then enter
Cat ~ / .ssh/id_rsa.pub > > ~ / .ssh/authorized_keys
Chmod 600 ~ / .ssh/authorized_keys
3. Then send the authorized_keys to the slave node slave1,slave2
Scp authorized_keys zkpk@slave1:~
Scp authorized_keys zkpk@slave2:~
4. To generate a key from a node, follow the first step
5. Move authorized_keys to the .ssh directory
Modify permissions
Chmod 600 ~ / .ssh/authorized_keys
6. Log in to the master node from the slave node, and log in to each other between the slave nodes
Cd .ssh
Ssh-copy-id-I id_rsa.pub zkpk@master; can enter this command.