Operating System - Linux
1820656 Members
2254 Online
109626 Solutions
New Discussion юеВ

rsh: ipaddress /hostname not found

 
Jai Harikrishnan
Occasional Advisor

rsh: ipaddress /hostname not found

Hi All,

I have to connect from one host to a different host on the same trusted network and the connection should not require a password.

In server 1, added, a .rhosts file under /
Created entries in the /.rhosts file
hostname
ipaddress

From server 2, tried to connect to server 1, like
rsh hostname
rsh ipaddress

In both, the cases, I get message like
rsh: hostname: not found.
rsh: ipaddress: not found.

Tried to do man rsh (in both machines), and got the error message as "No manual entry for rsh."

What, am I missing here?
Inputs will be sincerely appreciated.

Thanks in Advance

7 REPLIES 7
Olaf Thorm├дhlen
New Member

Re: rsh: ipaddress /hostname not found

1. does the output of "which rsh" give the correct path to rhs or does it give that of some kind of wrapper?

2. try adding the hostnames with their adresses to /etc/hosts.

you sould then be able to "rsh hostname"

olaf.
Security is not a solution, but a lifestlye.
Peter Kloetgen
Esteemed Contributor

Re: rsh: ipaddress /hostname not found

Hi Jai,

man pages are not automatically added for rsh. But your problem is definitely name resolution. Check your resolv.conf file and put the hostnames/IP- adresses into /etc/hosts file. That should do it for you.

Allways stay on the bright side of life!

Peter
I'm learning here as well as helping
benoit Bruckert
Honored Contributor

Re: rsh: ipaddress /hostname not found

Hi,
try first the network / IP to see if both server can communicate :
ping is a first tool. I think the trouble is more routing than anything else .
And may be there's a trouble with rsh, did you try first a telnet or anything else.
Or may be you have firewall options configured on one box...

hth
Benoit
Une application mal pans├йe aboutit ├а une usine ├а gaze (GHG)
Jai Harikrishnan
Occasional Advisor

Re: rsh: ipaddress /hostname not found

Thanks Guys, for all your responses.

# remsh hostname
# remsh ipaddress

Works fine.

I just need, rsh to work, so that, can push a software from server2 to server1.

If, I give
# rsh hostname

I get the error message as
rsh: hostname: not found.

Through some research, in the file inetd.conf, created the entry
shell stream tcp nowait root /usr/sbin/in.rshd in.rshd

In the .rhosts file, created the entry
hostname

Still, the same problem

Thanks for your inputs.
Stuart Browne
Honored Contributor

Re: rsh: ipaddress /hostname not found

What OS are you using? No Linux distribution I know of uses / as it's home directory.

the '.rhosts' file should be in the USERS home directory, so if you are wanting equivalence for 'root', then it should be '~root/.rhosts'.

After you made the entry into the 'inetd.conf' file, did you restart 'inetd' ?

Beyond that, what do the /var/log/messages file state about the attempt?

If it's a PAM enabled distribution, you might also want to be looking at /etc/pam.d/rsh, and commenting out the 'pam_securetty.so' line.

But no distribution details, so it's hard to know where to go..
One long-haired git at your service...
Mark Fenton
Esteemed Contributor

Re: rsh: ipaddress /hostname not found

This sounds like the difference between HP-UX rsh and linux rsh. In Linux rsh == rlogin if no command is given to run (default command, sh is assumed). In HP-UX, and possibly other Unices I haven't learned yet, rsh looks for a command to run. When you give rsh (no command)hostname, rsh looks at hostname as though it were a command and says not found.

If what you want to do is start a shell then remsh hostname is the syntax to use.

If you want to execute a particular program on the remote host (assuming you have priveleges to do so)
rsh program hostname
is the syntax you need

hope this helps

Mark
Olaf Thorm├дhlen
New Member

Re: rsh: ipaddress /hostname not found

as said before:

in unices other than linux the command rsh is not the remote-shell, but the restricted shell! the hostname would then be interpreted as a command.

lucky you did not name the machine "halt"... :-)

Security is not a solution, but a lifestlye.