Login Without Pwd
copy id_rsa to other nodes
yum install sshpass -y
mkdir -p /extend/shell
cat >>/extend/shell/distribute_pub.sh<< EOF
#!/bin/bash
ROOT_PASS=root123
ssh-keygen -t rsa -f ~/.ssh/id_rsa -P ''
for ip in 101 102 103
do
sshpass -p\$ROOT_PASS ssh-copy-id -o StrictHostKeyChecking=no 192.168.29.\$ip
done
EOF
cd /extend/shell
chmod +x distribute_pub.sh
./distribute_pub.sh