LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Remote Script execution from the central location (https://www.linuxquestions.org/questions/linux-general-1/remote-script-execution-from-the-central-location-443678/)

anil_garg5 05-10-2006 11:08 PM

Remote Script execution from the central location
 
Hi Group,

I need you guidance to solve my query.
How can I execute the scripts from some central unix server to other remote servers without actually copies the scripts on the remote servers ?

As I need to frequent update/change the scripts so I have to manually update all the scripts on the all remote servers. To avoid all such hassle, I want to put all the scripts with some common location and execute those scripts from that central location to all the remote servers; so that any script changes have to be done in the central server only.

Please suggest how it can possible ?

Thanks,
Anil

musicman_ace 05-10-2006 11:41 PM

If the target PC has the SSH server, you can pipe commands through ssh.

gilead 05-10-2006 11:42 PM

Can you use rsync in a cron job on the servers to get the updated copy of the script and run it?

anil_garg5 05-11-2006 06:07 AM

Thanks for your reply.

Is it possible to keep the scripts locally in my machine and execute those script on the remote server in SSh or any other way ?

gilead 05-11-2006 02:14 PM

Yes it is possible to use ssh that way - I don't have the syntax here at the moment, but there are some threads elsewhere on this forum that you can search through.

haertig 05-11-2006 03:29 PM

The remote servers could each mount the central server's filesystem containing the scripts and then run them. If you don't want to set up NFS, you could install sshfs on each remote server instead. http://fuse.sourceforge.net/sshfs.html If you want to control things completely from the central server (after installing sshfs on each remote), the central could open up an ssh session and run three commands: (1) mount the sshfs central server, (2) run the script, (3) unmount the sshfs central server. Or you could just leave the central server mounted all the time on the remotes.


All times are GMT -5. The time now is 12:51 AM.