Using script to implement bulk password-free login host

Source: Internet
Author: User

Experimental background

In a local area network, in which the designation of a host as a management machine, other hosts as the management machine, for the convenience of maintenance later, requires the implementation of the management machine without password, direct login to be managed machine.

Use VMware Workstation to build an analog LAN

The local area network has four hosts, through the virtual Switch Vnet1, realizes the interconnection interworking

All four hosts have CentOS6 installed, and the iptables and SELinux are closed.

Specify CentOS1 (192.168.10.2) as the management machine

Specify CentOS2 (192.168.10.3~5) as the managed machine

The Simple network topology is shown in the following illustration

Experimental purposes

Through the shell script, realize one execution, batch configuration management machine and the trust of the management machine, realize management machine password-free login is managed

Script composition

To facilitate script maintenance and expansion, the following set of scripts is implemented

# ll Total
-rw-r--r--1 root root 657 Nov  8 22:49 clientauthorize.sh
-rw-r--r--1 root 338 nov
 
  8 22:24 distribute.sh
-rw-r--r--1 root root 279 Nov  8 22:34 excuse.sh-rw-r--r--
1 root root  nov
  
   8 22:15 hostip.out -rw-r--r--1 root 210 Nov 8 20:30 ServerAuthorize.sh.example
  
 

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.