Assume that the master machine A, B, and C needs to be established as the master machine A. You can directly access the master machine B and C through SSH without a password. The procedure is as follows:
Assume that you only use the user yimr to establish trust, use the yimr user to log on to host a and perform the following operations:
- Generate public and private keys
ssh-keygen -t rsa
Then, the id_rsa and id_rsa.pub files are generated under the/home/user/. Ssh directory.
- Copy the public key to the BC Node
SCP. Ssh/id_rsa.pub B:/home/username/. Ssh/a. Pub
- Go to the BC node and put the public key in the authorized_keys file.
cat .ssh/A.pub >> .ssh/authorized_keys
- Permissions of machines A, B, and C must be modified.
chmod 755 .sshchmod 600 .ssh/authorized_keys
- A, B, and C each machine must modify the sshd configuration file Vim/etc/ssh/sshd_config
RSAAuthentication yesPubkeyAuthentication yesAuthorizedKeysFile .ssh/authorized_keysGSSAPIAuthentication noUseDNS no
service sshd restart