4 sname=`echo $fulln | sed 's/\..*//'`
5 nhead=`echo $sname | sed 's/[0-9]*//g'`
6 x=`ssh $fulln "ls .ssh/id_rsa"`
8 ssh $fulln "ssh-keygen -N '' -f .ssh/id_rsa";
10 xx=`ssh $fulln "ls .ssh/config"`
12 scp config $fulln:/home/ubuntu/.ssh/config
14 ssh $fulln "chown ubuntu:ubuntu .ssh/config"
15 ssh $fulln "chmod 0600 .ssh/config"
16 rsapub[$fulln]=`ssh $fulln "cat .ssh/id_rsa.pub"`
19 ssh $ii sudo iptables -F
22 if [ "$ii" != "$jj" ]; then
23 xxxx=`ssh $ii "grep $jj .ssh/authorized_keys"`
24 if [ -z "$xxxx" ]; then
25 ssh $ii "echo '$pval' | sudo tee -a /home/ubuntu/.ssh/authorized_keys"