Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Sending & Executing a perl script on remote machine.

by sflitman (Hermit)
on Oct 25, 2010 at 07:01 UTC ( #867156=note: print w/ replies, xml ) Need Help??


in reply to Sending & Executing a perl script on remote machine.

Assuming you have keychain running and have copied your server's id_rsa.pub to every client's authorized_keys file, and your script is already uploaded (executable bit set, and all its dependencies!), then you can just iterate in your favorite scripting language and execute this:

`ssh name@host$num '/path/to/myscript'`
And you will get the script's stdout output back. Now if it has to be a different script over and over, I suspect that can be automated by simply using File::Remote to send the script over first to each host (but remember the executable bit and its required modules).

HTH,
SSF


Comment on Re: Sending & Executing a perl script on remote machine.
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://867156]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2014-09-23 00:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (209 votes), past polls