how to remote a unix server in my cgi script

D

debbie523

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!
 
H

harini.gopi

debbie523 said:
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!
 
D

David Squire

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
 
D

debbie523

Jim said:
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
 
T

Ted Zlatanov

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top