Host IP addresses: 192.168.0.155, 192.168.0.156, and 192.168.0.158
- Modify sshd_config
Vim/etc/ssh/sshd_config
Authorizedkeysfile. Ssh/authorized_keys
- Create an SSH key
Ssh-keygen
Id_rsa is the generated local key.
Id_rsa.pub is the generated shared key for the other party to securely access the local machine.
- Copy the shared key and restart the service.
Copy the content in id_rsa.pub of the two machines to the authorized_keys file of the other machine, and restart the sshd service.
Id_rsa.pub of 192.168.0.156
Vim/root/. Ssh/id_rsa.pub
Ssh-RSA restart/cdnnaaaib/8wvucdx22/z99viwqbji6 + restart/rdwr + rqyxx6oriwpj/restart + restart/qic7orw = [email protected]
Id_rsa.pub of 192.168.0.158
Vim/root/. Ssh/id_rsa.pub
Ssh-RSA encrypt/ecnhqlemx2r + ZBT/m15zcgbuaz1tecnln9ndin + encrypt/decrypt/UA + t2mwaespjeu17bll + encrypt/A/decrypt = [email protected]
Authorized_keys of 192.168.0.155
Vim/root/. Ssh/authorized_keys
Ssh-RSA restart/cdnnaaaib/8wvucdx22/z99viwqbji6 + restart/rdwr + rqyxx6oriwpj/restart + restart/qic7orw = [email protected]
Ssh-RSA encrypt/ecnhqlemx2r + ZBT/m15zcgbuaz1tecnln9ndin + encrypt/decrypt/UA + t2mwaespjeu17bll + encrypt/A/decrypt = [email protected]
Three servers do not require password-based mutual access