Multi-virtual Machine trust under Centos 7

Source: Internet
Author: User

Assuming three virtual machines a (10.139.8.82), B (10.139.8.83), C (10.139.8.84), you need to ensure the connectivity of the network between the three virtual machines.


Operation Steps:


First, the configuration on a machine


① log in as root to change the SSH configuration file/etc/ssh/sshd_config

Rsaauthentication Yes #启用rsa认证

Pubkeyauthentication Yes #启用公钥私钥配对认证方式

Authorizedkeysfile. Ssh/authorized_keys #公钥文件路径


[[email protected]/] #systemctl restart sshd//restart SSH service


② generating a public key private key pair

[[email protected]/] #ssh-keygen-t RSA

The system generates ID_RSA, id_rsa.pub under/root/.ssh


③ send the Id_rsa.pub under the A machine to B, C machine

[[email protected]/] #ssh-copy-id-i/root/.ssh/id_rsa.pub 10.139.8.83

[[email protected]/] #ssh-copy-id-i/root/.ssh/id_rsa.pub 10.139.8.84


Second, B, C machine using the same method in step one, remember to change the IP address


Third, realize SSH multi-machine mutual trust

Take a machine as an example

[[email protected]/] #ssh 10.139.8.83//login B Machine

[[email protected]/] #ifconfig//Check if login is successful

[[email protected]/] #exit//exit SSH login, return to this machine

This article is from the "11877272" blog, please be sure to keep this source http://11887272.blog.51cto.com/11877272/1828587

Multi-virtual Machine trust under Centos 7

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.