Solved

a problem with rcmd and rexec  routines

Posted on 2002-03-19
3
938 Views
Last Modified: 2012-05-04
My linux application need a way of starting its remote server on the same platform.
rcmd and rexec are for me the answer to the need, but
then a problem arises.

For the rcmd I'm providing the necessary arguments
perfectly :
   For a try on single machine using a looping TCP
   connection (i.e to 127.0.0.1 with localhost as the
   hostname).  
   
    char **ahost;
    *host=(char *)malloc(30);
    strcpy(*host,"localhost");
    rcmd(**ahost,514,"root","spy","mkdir new",0)
   
The execution of this compiled version of these codes
give as error message: Permission Dinied.

showing that The authentication failed.

for the case of rexec I try with a similar demo with
port number 512 but this
time the error message is
-> :localhost.localdomain: connection refused. (which appears after a long waiting )

My question is :
--------------
  Is there some special configurations
practices needed by the server (rshd and rexecd)of these two routines.
Or is there any special way to use this two routines? If
yes can u please tell me the minimum necessary
requirements that must checked before having a successful
usage of this two routines.
steps
 







 

  ahost,rport,locuser,ruser



0
Comment
Question by:marech
[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 Comments
 
LVL 2

Accepted Solution

by:
pheur earned 100 total points
ID: 6902249
1. Forget about rcmd, rsh, rexec, rlogin, and even telnet. use ssh instead. Any decent Linux or UNIX distribution has it. You will have to use

system("ssh ruser@host remote command");

This normally requires you to enter a password. To avoid it generate with ssh-keygen a keypair, and install the public key on the remote machine and the private key on the machine starting ssh. See the ssh documentation for more details.

2. If you still insist on using the horribly insecure rcmd/rexec, make sure that rexec is enabled on the remote machine in /etc/inetd.conf, and is not filtered by the firewall.
3. Applications that start their servers on remote machines are a very bad habit.

----
Radu-Adrian Feurdean
Brainbench Linux MVP
0
 
LVL 20

Expert Comment

by:jmcg
ID: 9901570
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:

Accept: pheur {http:#6902249}

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

Is Your Team Achieving Their Full Potential?

74% of employees feel they are not achieving their full potential. With Linux Academy, not only will you strengthen your team's core competencies but also their knowledge of of the newest IT topics.

With new material every week, we'll make sure that you stay ahead of the game.

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…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses

628 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