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 ?
gopubhaskarAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Networking

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.