Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

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

Posted on 2003-03-06
11
Medium Priority
?
182 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
  • 3
  • 3
  • 2
  • +2
10 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

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 fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
Screencast - Getting to Know the Pipeline
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…
Suggested Courses

578 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