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

Re: run perl script on remote server

by bitingduck (Chaplain)
on Sep 08, 2012 at 05:32 UTC ( #992430=note: print w/ replies, xml ) Need Help??


in reply to run perl script on remote server

If you're running from the command line on server C, why can't you just ssh into server A where your script is and run from the command line there? The script can also ssh over to server B to manipulate your files. If you set things up with ssh public/private keypairs, you can do it without having to store passwords anywhere. You might want to use Net:SSH in your scripts. It's not clear that there's much perl-specific in the question.


Comment on Re: run perl script on remote server
Replies are listed 'Best First'.
Re^2: run perl script on remote server
by sumit07 (Novice) on Sep 08, 2012 at 06:18 UTC
    for ssh to server A do we need another software lyk putty or cygwin
      This is the first clue you have given that you are running Windows machines.

      IF these machines are on the same domain, and/or IF your login credentials on C have access to the shares on A and B, you can do something like this from the command-line on machine C:

      C:\> perl \\A\Path\to\code\share\codefilename.pl \\B\path\to\data\Dat +afile.fil
      Then your prograam can use the diamond operator to access the file, without being programmed explicitly for file access on a remote machine.

      If the machines do not have explicit shares, and if you have administrator priviledges,
      You can access the "hidden" shares at the root of the drive like:

      \\A\C$\path\to\data-or-code
      Note : C$ indicates the C:\ drive.

                   I hope life isn't a big joke, because I don't get it.
                         -SNL

      I have no idea how to do things in windows-- it's pretty straightforward on a typical *nix setup. NetWallah and Anonymous Monk both posted suggestions that will likely work with windows.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (9)
As of 2015-07-29 22:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (269 votes), past polls