标签:end bash air ssh == ash done file echo
#!/bin/bash#create key pair
\rm -f /root/.ssh/id_dsa
ssh-keygen -t dsa -f /root/.ssh/id_dsa -P "" -q
#fenfa_key file
for ip in 7 41 31
do
echo "====== fanfa key to host 172.16.1.$ip==================="
sshpass -p123456 ssh-copy-id -i /root/.ssh/id_dsa.pub "-o StrictHostKeyChecking=no root@172.16.1.$ip"
echo "====== fenfa END==================="
echo ""
done
标签:end bash air ssh == ash done file echo
原文地址:http://blog.51cto.com/13132636/2066607