Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
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 exploiting the Monastery: (15)
As of 2014-07-30 08:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (229 votes), past polls