Create a public key between liunx

Source: Internet
Author: User
Tags key string
Create A public key between liunx: no password for access between two liunx & lt; key & gt; specific configuration: 1: If you are currently on server A, you need to access server B. The key must be generated on server. 2: run the script ssh-keygen-trsa on server. Create Public Key 1 between liunx: no password for access between two liunx <密钥> Specific Configuration: 1: If you are currently on server A, you need to access server B. The key must be generated on server. 2: run the script ssh-keygen-t rsa on server. Then press Enter. In this case, the. ssh directory under the home directory of the corresponding userTwo files are generated. Id_rsa and id_rsa.pub. Explanation: id_rsa: private key. Id_rsa.pub: public key. 3: copy id_rsa.pub to the. ssh directory in the home directory of the corresponding user on server B.. Change the name to authorized_keys. Then you can run the script ssh hudson@110.1.27.3 on server A to access user B without A password. In this case, enter the password. 4. set file and directory permissions: set authorized_keys permission $ chmod 600 authorized_keys to set. ssh directory permissions $ chmod 700-R. ssh if the C server also needs to access server B. At this time, the key is generated on server C and the public key is placed in directory B, and the name will be duplicated. Solution: Copy the public key of server C to the authorized_keys file. Note the line feed. Generate A key. duplicate the key generated by the target. The key string generated by the two servers is merged into one. <Line Feed>
Related Article

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.