#!/bin/bash
IPLIST="
192.168.1.11
192.168.1.12
192.168.1.13"
rpm -q sshpass &> /dev/null || yum -y install sshpass
[ -f /root/.ssh/id_rsa ] || ssh-keygen -f /root/.ssh/id_rsa -P ''
export SSHPASS=123456
for IP in $IPLIST;do
{ sshpass -e ssh-copy-id -o StrictHostKeyChecking=no $IP; } &
done
wait
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END