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