i need to zap authorized_keys *all over the place*
this concatenates a file which contains sever id_rsa.pub keys.
nodes is a long list of ip addresses.
#!/bin/bash
for i in `cat nodes` ; do
cat authorized_keys.add | ssh -o ConnectTimeout=5 -o StrictHostKeyChecking=no -o \
UserKnownHostsFile=/dev/null -t -t -t -l root $i 'cat >> /root/.ssh/authorized_keys'
done
No comments:
Post a Comment