Linux dual-machine/multi-machine Trust

Source: Internet
Author: User

[Email protected] ~]$ CD

[[email protected] ~]$ mkdir. SSH (centos6.0 not required)

[[email protected] ~]$ chmod. SSH (centos6.0 no need)

[[email protected] ~]$ ssh-keygen-t RSA

Generating public/private RSA key pair.

Enter file in which to save the key (/HOME/DEVEN/.SSH/ID_RSA): (Enter)

Enter passphrase (empty for No passphrase): (carriage return)

Enter same passphrase again: (enter)

Your identification has been saved In/home/deven/.ssh/id_rsa.

Your public key has been saved in/home/deven/.ssh/id_rsa.pub.

The key fingerprint is:

89:56:D6:4A:B2:6C:4A:05:86:AE:CD:7D:80:DD:3C:F1 [email protected]

Intermediate Process Direct 3 carriage return. In the ~/.ssh/directory, two files were generated: Id_rsa (the private key file is placed locally) and id_rsa.pub (the public key file is placed on the trust server).

On Node2, do the same with the user Deven identity.

2. Summarize all public key file id_rsa.pub into a total authentication file Authorized-keys:

[email protected] ~]$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

[[email protected] ~]$ ssh [email protected] Cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

3. Currently there is a complete authentication key file on Node1, this time, copy it to the corresponding directory of the NODE2 host

[Email protected] ~]$ SCP ~/.ssh/authorized_keys [email Protected]:~/.ssh/authorized_keys

As with other users, the goal is to generate Id_rsa under/home/user/.ssh/, Id_rsa.pub, and then append id_rsa.pub to the Authorized_keys file of the cluster share.

It is recommended that all files under/home/user/.ssh/be set to 700 permissions.


This article is from the "7727197" blog, please be sure to keep this source http://7737197.blog.51cto.com/7727197/1663099

Linux dual-machine/multi-machine Trust

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.