I recommend using SSH with private and public key with rsync for simplicity.
http://www.ibm.com/developerworks/eserver/library/es-ssh/?ca=dgr-lnxw06ParallelCommandsWithSSH
Configuration:
Server 172.24.223.52 contains a shell script to add date to t.log when executed:
:/home/oracle$ cat t.sh
date >> t.log
Use rsync to synchronize files across servers:
:/home/oracle$ rsync -arvvz –delete-after –rsh=/usr/bin/ssh 172.24.223.52:/home/oracle/t.log /home/oracle/t2.log
opening connection using /usr/bin/ssh 172.24.223.52 rsync –server –sender -vvlogDtprz . /home/oracle/t.log
receiving file list …
[sender] expand file_list to 131072 bytes, did move
done
delta transmission enabled
/home/oracle/t2.log
total: matches=0 tag_hits=0 false_alarms=0 data=58
sent 36 bytes received 267 bytes 606.00 bytes/sec
total size is 58 speedup is 0.19
Updated file:
:/home/oracle$ cat t2.log
Mon Jul 9 16:41:53 UTC 2007
Mon Jul 9 16:42:36 UTC 2007
Executing rsync again shows file is up to date:
:/home/oracle$ rsync -arvvz –delete-after –rsh=/usr/bin/ssh 172.24.223.52:/home/oracle/t.log /home/oracle/t2.log
opening connection using /usr/bin/ssh 172.24.223.52 rsync –server –sender -vvlogDtprz . /home/oracle/t.log
receiving file list …
[sender] expand file_list to 131072 bytes, did move
done
delta transmission enabled
/home/oracle/t2.log is uptodate
total: matches=0 tag_hits=0 false_alarms=0 data=0
sent 16 bytes received 187 bytes 406.00 bytes/sec
total size is 58 speedup is 0.29
Execute shell script remotely:
:/home/oracle$ ssh 172.24.223.52 /home/oracle/t.sh
Synchronize file:
:/home/oracle$ rsync -arvvz –delete-after –rsh=/usr/bin/ssh 172.24.223.52:/home/oracle/t.log /home/oracle/t2.log
opening connection using /usr/bin/ssh 172.24.223.52 rsync –server –sender -vvlogDtprz . /home/oracle/t.log
receiving file list …
[sender] expand file_list to 131072 bytes, did move
done
delta transmission enabled
/home/oracle/t2.log
total: matches=0 tag_hits=0 false_alarms=0 data=87
sent 42 bytes received 273 bytes 630.00 bytes/sec
total size is 87 speedup is 0.28
Updated file:
:/home/oracle$ cat t2.log
Mon Jul 9 16:41:53 UTC 2007
Mon Jul 9 16:42:36 UTC 2007
Mon Jul 9 16:43:04 UTC 2007