A summary of Linux dual-machine SSH mutual trust method

Source: Internet
Author: User

Method One:

1.ssh-keygen-t rsa-b 1024x768- TRepresentation Type- brepresents the key size (or, of course, it can be generated directly using Ssh-keygen) 2. Test @local-host$ ssh-copy-id-i ~/.ssh/id_rsa.pub remote-host (so that the key authentication of the transmission is also test users, please according to their own needs, to do the appropriate operation The default is saved to the corresponding user of the Remote-host .. In Ssh/authorized_keys)

3. ssh remote-host (or pay attention to the use of the user)

Repeat this operation on another server


Method Two:

  1. ssh-keygen-t rsa-b The same procedure for creating a secret key

  2.      chmod-r ~/.ssh; Copy the public key to another machine , write to authorized_keys

  3. < Span style= "color: #2c2c2c; font-family: ' The song Body '; >      scp  public key  [email protected] another ip:root/

  4. public key >>/root/.ssh/authorized_keys; chmod 600/root/.ssh/authorized_keys (operation in remote-host) Another server repeat this operation


A summary of Linux dual-machine SSH mutual trust method

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.