Multi-VM mutual trust in Centos 7

Source: Internet
Author: User

Multi-VM mutual trust in Centos 7

Assume that the network connectivity between the three VMS is guaranteed, for example, A (10.139.8.82), B (10.139.8.83), and C (10.139.8.84.

Procedure:

1. Configure on server

① Log On As the root user and change the ssh configuration file/etc/ssh/sshd_config

RSAAuthentication yes # enable rsa Authentication

PubkeyAuthentication yes # enable public key/private key pair Authentication

AuthorizedKeysFile. ssh/authorized_keys # public key file path

[Root @ localhost/] # systemctl restart sshd // restart the ssh service

② Generate a public key/private key pair

[Root @ localhost/] # ssh-keygen-t rsa

The system generates id_rsa and id_rsa.pub under/root/. ssh.

③ Send id_rsa.pub under server A to server B and server C.

[Root @ localhost/] # ssh-copy-id-I/root/. ssh/id_rsa.pub 10.139.8.83

[Root @ localhost/] # ssh-copy-id-I/root/. ssh/id_rsa.pub 10.139.8.84

2. Machine B and machine C adopt the same method in step 1. Remember to change the IP address

Iii. achieve mutual trust between multiple ssh hosts

Take host A as an Example

[Root @ localhost/] # ssh 10.139.8.83 // log on to B

[Root @ localhost/] # ifconfig // check whether logon is successful

[Root @ localhost/] # exit // log out of ssh and return to the Local Machine

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.