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