-   Linux - General (
-   -   How to run same script on multiples servers (

s_linux 07-21-2009 01:35 PM

How to run same script on multiples servers
Hi All,
I have some script that run some commands and send results to my email. I want to run same script on mulitiple servers. How can I do that. I know there is an option "ssh". But I'm not quite sure how to use it in the script.

And also. scripts has some parameters like following,

if [ -f "/some/some/some1"]: then

do something.

"/some/some/some1" will vary by the server.

Any body have an idea. Thanks

acid_kewpie 07-21-2009 02:52 PM

the way to use ssh is to run "ssh user@host myscript" which will then run "myscript" on the remote server. This method would only work if you're using preshared SSH keys to remove the need for passwords with ssh. and you want to pass a parameter to the script? fine, just add it on to the command line.

All times are GMT -5. The time now is 02:35 PM.