Pages

Tuesday, August 7, 2007

Script to ssh to machines and execute the script

# This script will ssh to remote machines and execute the script.

#!/bash/ksh

for host in `cat hostname`
do
ssh username@$host sh -x /abcd/script.sh> $host.out
echo $host
done

No comments: