how to remote a unix server in my cgi script

Discussion in 'Perl Misc' started by debbie523, Jun 27, 2006.

  1. debbie523

    debbie523 Guest

    I have a cgi script stay in one unix server A, and in this cgi script I
    have to call a program which sits on another unix server B. so there
    should have server lines to login B in my cgi script. Is there somebody
    help me figure out what's the specific command I should use.

    I appreciate your help!
    debbie523, Jun 27, 2006
    #1
    1. Advertising

  2. debbie523

    Guest

    debbie523 wrote:
    > I have a cgi script stay in one unix server A, and in this cgi script I
    > have to call a program which sits on another unix server B. so there
    > should have server lines to login B in my cgi script. Is there somebody
    > help me figure out what's the specific command I should use.
    >
    > I appreciate your help!




    hi

    I am fairly new to this group , and I had a situation similar to yours.
    So I was just curious to see what was the best way to handle
    communication between two servers especially if they sit on 2
    different operating systems. I finally wrote a socket program that
    communicates to the windows server -the arguments from the CGI and then
    returns the result again via a socket (to the linux server) to be
    displayed back in the browser. Am not sure if this a good way to do it
    but it worked in the end. Would like to hear other responses though!
    , Jun 27, 2006
    #2
    1. Advertising

  3. debbie523

    David Squire Guest

    wrote:
    > debbie523 wrote:
    >> I have a cgi script stay in one unix server A, and in this cgi script I
    >> have to call a program which sits on another unix server B. so there
    >> should have server lines to login B in my cgi script. Is there somebody
    >> help me figure out what's the specific command I should use.
    >>
    >> I appreciate your help!

    >
    >
    >
    > hi
    >
    > I am fairly new to this group , and I had a situation similar to yours.
    > So I was just curious to see what was the best way to handle
    > communication between two servers especially if they sit on 2
    > different operating systems. I finally wrote a socket program that
    > communicates to the windows server -the arguments from the CGI and then
    > returns the result again via a socket (to the linux server) to be
    > displayed back in the browser. Am not sure if this a good way to do it
    > but it worked in the end. Would like to hear other responses though!
    >


    You could use modules such as LWP::Simple, LWP::UserAgent or
    WWW::Mechanize to call the script on server B and capture the result.


    DS
    David Squire, Jun 27, 2006
    #3
  4. debbie523

    debbie523 Guest

    Jim Gibson wrote:
    > In article <>,
    > debbie523 <> wrote:
    >
    > > I have a cgi script stay in one unix server A, and in this cgi script I
    > > have to call a program which sits on another unix server B. so there
    > > should have server lines to login B in my cgi script. Is there somebody
    > > help me figure out what's the specific command I should use.

    >
    > What protocol does your CGI program on server A use to run the program
    > on server B? SSH? RSH? RPC? HTTP/CGI?


    SSH


    > Is the program on server B
    > running all the time or does the program on server A have to launch it?


    the program on server A have to launch it.


    >How do you run the program without using Perl?


    It is a c++ parallel program

    > The answers to these questions will greatly affect the answers.
    debbie523, Jun 28, 2006
    #4
  5. debbie523

    Ted Zlatanov Guest

    On 28 Jun 2006, wrote:

    > In article <>,
    > debbie523 <> wrote:
    >
    >> Jim Gibson wrote:
    >>> In article <>,
    >>> debbie523 <> wrote:
    >>>
    >>>> I have a cgi script stay in one unix server A, and in this cgi script I
    >>>> have to call a program which sits on another unix server B. so there
    >>>> should have server lines to login B in my cgi script. Is there somebody
    >>>> help me figure out what's the specific command I should use.
    >>>
    >>> What protocol does your CGI program on server A use to run the program
    >>> on server B? SSH? RSH? RPC? HTTP/CGI?

    >>
    >> SSH

    >
    > Then I would search CPAN for SSH modules. Net::SSH::perl, Net::SSH, and
    > Bundle::SSH look like good possibilities. I have not used any of these
    > or used SSH at all from Perl, so cannot advise you further.


    Often, people find it sufficient to do

    system("/usr/bin/ssh", @parameters);

    rather than resort to Perl modules to achieve the same results.
    Sometimes this is not possible due to implementation details, but
    perhaps the OP would find it useful to consider this alternative first
    because it's simplest.

    Ted
    Ted Zlatanov, Jun 28, 2006
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mwmann
    Replies:
    8
    Views:
    2,489
    mwmann
    Sep 14, 2006
  2. davidj411
    Replies:
    7
    Views:
    3,252
    Tim Golden
    Oct 8, 2009
  3. Replies:
    2
    Views:
    673
    Gregory Bartholomew
    Feb 18, 2008
  4. kath
    Replies:
    4
    Views:
    561
    J. Gleixner
    Apr 9, 2007
  5. bassintro

    Help finding CGI files on Unix server

    bassintro, Jul 2, 2007, in forum: Perl Misc
    Replies:
    17
    Views:
    235
    bassintro
    Jul 10, 2007
Loading...

Share This Page