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

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 250
  • Last Modified:

Running command in remote machine

I am writing a script to run a command in a remote machine. I tried "rsh" but found out that it was not useful enough for my purpose. Then I tried "rexec" but it didnt work at all, everytime it shows the error "Connection Refused" is there any other method ? or can someone please suggest how to make rexec work ?
0
gopubhaskar
Asked:
gopubhaskar
1 Solution
 
heskyttbergCommented:
Hi!

I'm not sure if there is an easier way, but with openssh you can do this. But rsh would be easier, I don't understand why you can't use rsh.

http://www.openssh.com/

Regards
/Hans - Erik Skyttberg
0
 
tfewsterCommented:
rexec should prompt you for a password, but that's about the only difference from rsh...
0
 
yuzhCommented:
To make rsh work, you need to put a .rhosts your home dir (at least in the remote box).

let'say you do it from box1 to box2, the both machine has the same login name. you put a .rhosts under you home dir, the format looks like:

box1-name your-login-name

please check your /etc/inetd.conf file to have in.rshd enable.

Use rsh, rpc is not secure ! I strongly recommended you to set up secure shell (ssh), openssh can be download from the web for your version of OS

http://www.openssh.org/

Cheers!
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
Dreamn3dCommented:
OpenSSH (ssh in general) allows you to you hostbased auth with pre-setup keys.  Kind of tricky the first couple of setups but works great once you learn it.


Jess
0
 
yuzhCommented:
why a C ?
0
 
moduloCommented:
Hi gopubhaskar

Please take a moment to read:
http://www.experts-exchange.com/Operating_Systems/WinNT/cmtyQuestAnswer.jsp#3

We value our experts who are investing their time and effort to solve Q's for others. That's why I kindly ask you to read the grading text and add a comment or the grade given fits the description or that I have to make a change.

When no comment has been added within 72 hrs I'll change the grade to an "A"

Thanks !

modulo

Community Support Moderator
Experts Exchange
0
 
moduloCommented:
changed the grade to an "A"

modulo

Community Support Moderator
Experts Exchange
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now