gfb: script to copy multiple files to multiple servers

From: gabriel borrageiro (gborrageiro@hotmail.com)
Date: Thu Dec 16 2004 - 05:19:34 EST


helllo friends,

I am trying to create a script which will scp multiple local files to to
multiple remote hosts.
Below is my failed attemt :o(
Your help would be greatly appreciated.
PS. I am using ssh keys so do not need passwd to log onto remote server.

#################
#!/usr/bin/bash

while :
do
keys=`ls /opt/ssh/auth_keys/`

for i in `cat /var/tmp/servers` ;
do scp /opt/ssh/auth_keys/$keys $i:/opt/ssh/auth_keys/
done
done
#################

best regards,

Gabriel
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:29:52 EDT