?
Solved

Run second server's program from the first server's program

Posted on 2003-03-06
11
Medium Priority
?
181 Views
Last Modified: 2010-04-21
Hi, i have 2 servers (linux). I have perl programs in both the servers. how can I run a perl program of server-2 from the perl program of server-1. Both the servers are connected to the net. They have IP's.
0
Comment
Question by:vijayakumar_m10
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +2
11 Comments
 
LVL 8

Expert Comment

by:JIEXA
ID: 8083112
From the same user-ID (number & string), you can do this
using rsh; this way:
from server1:
   rsh server2 /usr/bin/perl /path/on/server2/to/prog2
and from server2:
   rsh server1 /usr/bin/perl /path/on/server2/to/prog1
0
 

Author Comment

by:vijayakumar_m10
ID: 8083320
if i tried the above one i am getting the message that connection timmed out
0
 
LVL 8

Expert Comment

by:JIEXA
ID: 8086295
Try to do a "rsh remotehost". If you get a "Password:" prompt, then add "+host1" to $HOME/.rhosts on host2,
and add "+host2" to $HOME/.rhosts on host1.

Otherwise (if you do not get "Password:" prompt),
check whether there is a listener for this service
(edit /etc/xinetd.d/rsh file and set "enabled = yes",
and then "kill -1 xinetd"). Then try again.

If you have no root permissions, use may try to use ssh (secure shell), or more unsecure solution: using "expect" with "telnet" to 'speak' with remote system.
0
Linux Academy Android App Now Supports Chromecast

We have some fantastic news for our Android fans. We’re so excited to announce that the Linux Academy Android app is now available with Chromecast support. That’s right – simply download the latest update of the Linux Academy App and start casting your favorite course videos!

 
LVL 2

Expert Comment

by:jimbb
ID: 8086376
Use ssh in either case; rsh (as well as telnet) is deprecated.
0
 

Author Comment

by:vijayakumar_m10
ID: 8090232
If i tried "rsh remotehost" i am getting the message as connectio refused. Now what i have to do
0
 
LVL 2

Expert Comment

by:jimbb
ID: 8090717
vijaya, please don't use rsh.  As I mentioned above, it's an obsolete service -- and in fact, it's not going to work anyway if the remote machine is not running the rsh server.

Use an ssh server on the remote host, and an ssh client on the local (client) host.
0
 

Author Comment

by:vijayakumar_m10
ID: 8090747
How can i run the program of the other server by using ssh client
0
 
LVL 2

Accepted Solution

by:
jimbb earned 100 total points
ID: 8090838
ssh remotehost "remote_command here"

man ssh
0
 
LVL 1

Assisted Solution

by:rduta
rduta earned 100 total points
ID: 8131351
ssh works well; though you will have to properly set up the keys.

1) create a key with no password.
2) on the destination host put the public key in the ~/.ssh/authorized_keys
3) log in manually once to test the connection.
0
 
LVL 20

Expert Comment

by:jmcg
ID: 10101957
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Split: jimbb {http:#8090838} & rduta {http:#8131351}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jmcg
EE Cleanup Volunteer
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses
Course of the Month13 days, 7 hours left to enroll

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question