Multi-server dual-machine trust, password-free login, fast login to more than one server

Source: Internet
Author: User

Double-click mutual trust, that is, mutual parsing and do not need to enter a password to log on to another server, the cluster services, such as MySQL master and slave, heartbeat do high availability, copy file transfer, provide fast and convenient service.


Experiment to prepare three virtual machines (192.168.239.136./192.168.239.140/192.168.239.144)


Vi/etc/hosts doing local parsing

192.168.239.136 Node36

192.168.239.140 Node40

192.168.239.144 node44


Ssh-keygen generates a private key with a pair of keys, generated in the home directory, belongs to the hidden file

Root default/root, or direct ls-a view, there will be . SSH directory

If you are the root user, you can directly use CD. SSH, go to see the key pair file

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M02/82/4C/wKiom1dQVCuhH05zAAANtz4gYU0543.png-wh_500x0-wm_3 -wmp_4-s_2650285802.png "title=" Clipboard.png "alt=" Wkiom1dqvcuhh05zaaantz4gyu0543.png-wh_50 "/>

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>650 "this.width=650; src=/e/ U261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/images/localimage.png") No-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>

Id_rsa the private key id_rsa.pub as the public key

Copy the public key to two other machines

Node36 Ssh-copy-id node40 Ssh-copy-id node44

Node40 Ssh-copy-id node36 Ssh-copy-id node44

Node44 Ssh-copy-id node36 Ssh-copy-id node40


At this point directly specify any one machine can log in, using the command as follows

SSH node36 or ssh node40 or ssh node44



This article is from the Linux system Learning extension blog, so be sure to keep this source http://zhangxiaoxiong.blog.51cto.com/11657691/1785762

Multi-server dual-machine trust, password-free login, fast login to more than one server

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.