Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

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 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).


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://867156]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (10)
As of 2017-02-23 12:51 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (346 votes). Check out past polls.