Three servers do not require password-based mutual access

Source: Internet
Author: User

Host IP addresses: 192.168.0.155, 192.168.0.156, and 192.168.0.158

  1. Modify sshd_config

Vim/etc/ssh/sshd_config

Authorizedkeysfile. Ssh/authorized_keys

 

  1. 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.

  1. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.