help needed. run shell scipt remotely

Dear all ,

I have a script. this script called get.sh and can get some solaris infomation and save the result as result.tar.gz.

the problem is : we have 12 servers. every time. I need to login 12 server and do the same job 12 times.:mad:

         master server
               |

- - - - - - - - - - - - - - - - -
| | | |
slave1 slave2 slave3 slave n

my idea:

  1. choose one server as master server, I just need to upload the get.sh to this server.
  2. define slave server's ip, account in master server ,and save these infomation as account.cfg
  3. master server can copy the get.sh to slave server
    4.master server run the script in slave server.
  4. master server get all infomation result.tar.gz and ftp to master server.

My question is about step 4.

How can I write a script to execute get.sh on slave server.

master ------------------------------->>> slave
another server needed? get.sh

if the script is in master server You can copy that to the slave server using rcp or may be ftp.

And from master server u can use rsh to execute the remote script
pls check the man pages of rsh for more details

You can actually run the script from the master server this way

[#Use the case statement and run one script on the master server

#use already created ssh keys
case $1
in
client1 key=client1 ;;
client2 key=client2 ;;
clientn key=clientn ;;
esac

case $1
in
client1 USER=user1 ;;
client2 USER=user2 ;;
clientn USER=user3 ;;
esac

ssh -i ssh_key_directory/$key $USER@$1<<EF
#run whatever u want to run on the clients
cmd1
cmd2

EF]

U can search the forum on how to create ssh keys.