Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to make multiple virtual machines trust each other under Centos7

Shulou Source: shulou.com Published: 2022-06-01 14:34:38 10月02日 Update

This article mainly explains "how to make multiple virtual machines trust under Centos7". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to make multi-virtual machines trust each other under Centos7".

Suppose three virtual machines A (10.139.8.82), B (10.139.8.83) and C (10.139.8.84) need to ensure network connectivity between the three virtual machines.

Operation steps:

First, configure on machine A

① logs in as root user, change ssh profile / etc/ssh/sshd_config

RSAAuthentication yes # enable rsa authentication PubkeyAuthentication yes # enable public key private key pairing authentication AuthorizedKeysFile .ssh / authorized_keys # Public key file path [root@localhost /] # systemctl restart sshd / / restart the ssh service

② generates public and private key pairs

[root@localhost /] # ssh-keygen-t rsa system generates id_rsa and id_rsa.pub under / root/.ssh

③ sends the id_rsa.pub under machine A to machines B and 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

B and C machines use the same method as in step 1, and remember to change the ip address.

Third, realize ssh multi-computer mutual trust.

Take A machine as an example

[root@localhost /] # ssh 10.139.8.83 / / Log in to machine B [root@localhost /] # ifconfig / / check whether you have successfully logged in [root@localhost /] # exit / / log in to ssh. Thank you for your reading. The above is the content of "how to make multiple virtual machines trust each other under Centos7". After the study of this article, I believe you have a deeper understanding of how to make multiple virtual machines trust each other under Centos7. The specific use situation still needs to be verified by practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Login public key learning content files steps three generation authentication configuration same success between address that is ideas situations articles ways methods Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Microsoft Linux Docker vpn