Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > how to remote a unix server in my cgi script

Reply
Thread Tools

how to remote a unix server in my cgi script

 
 
debbie523
Guest
Posts: n/a
 
      06-27-2006
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!

 
Reply With Quote
 
 
 
 
harini.gopi@gmail.com
Guest
Posts: n/a
 
      06-27-2006
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!

 
Reply With Quote
 
 
 
 
David Squire
Guest
Posts: n/a
 
      06-27-2006
http://www.velocityreviews.com/forums/(E-Mail Removed) 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
 
Reply With Quote
 
debbie523
Guest
Posts: n/a
 
      06-28-2006

Jim Gibson wrote:
> In article <(E-Mail Removed) .com>,
> debbie523 <(E-Mail Removed)> 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.


 
Reply With Quote
 
Ted Zlatanov
Guest
Posts: n/a
 
      06-28-2006
On 28 Jun 2006, (E-Mail Removed) wrote:

> In article <(E-Mail Removed). com>,
> debbie523 <(E-Mail Removed)> wrote:
>
>> Jim Gibson wrote:
>>> In article <(E-Mail Removed) .com>,
>>> debbie523 <(E-Mail Removed)> 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:erl, 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
how to retrieve CGI rss feed using asp.net but error The remote server returned an error: (503) Server Unavailable. rote ASP .Net 0 03-06-2008 11:26 PM
How to execute script in unix (remote server) via asp application? nimhyea@gmail.com ASP General 2 02-18-2008 06:35 PM
what's wrong calling a Perl/CGI script in Perl/CGI script under Tomcat server? kath Perl Misc 4 04-09-2007 09:21 PM
Running unix shell script from remote java app mwmann Java 8 09-14-2006 06:43 AM



Advertisments