Operating System - HP-UX
1834500 Members
2986 Online
110068 Solutions
New Discussion

rlogin without a password prompt in linux

 
alak_datta
New Member

rlogin without a password prompt in linux

Hello eveybody,
For setting a distributed computing environment, I want to rsh (rlogin) to different machines without a password prompt. I have three machines,
"MACHINE_A", "MACHINE_B", MACHINE_C". Problem is the following.

I can rlogin (rsh) without a passwd prompt from (to) MACHINE_A to (from) MACHINE_B.
I can rlogin (rsh) without a password prompt from (to) MACHINE_B to (from) MACHINE_C.

I can also rlogin(rsh) from MACHINE_A to MACHINE_C without a pawwsd prompt. But, I am not able to do the same from MACHINE_C to MACHINE_A.

All machines a linux machines. User name is the same in all the machines. .rhosts at users home directories includes hostsnames as well as IP addresses of all three machines.

I will appreciate anybody's help, Please tell me where I am making the mistake.

Thank you,



4 REPLIES 4
RAC_1
Honored Contributor

Re: rlogin without a password prompt in linux

You have problem with C to A. From C to A, just do plain login. (use same account that you want to use for rlogin), do who -um, the host name/ip that it shows in last column should be put into .rhosts file on host A.

If this doesn't resolve it, then try putting ip/FQDN in .rhosts file.
There is no substitute to HARDWORK
Victor Fridyev
Honored Contributor

Re: rlogin without a password prompt in linux

Hi,

Check name/address resolution on both A and C machines.

You need to have correct resolution for:
nslookup A and nslookup IP-A
nslookup C and nslookup IP-C

HTH
Entities are not to be multiplied beyond necessity - RTFM
IT_2007
Honored Contributor

Re: rlogin without a password prompt in linux

you can add entry like this in .rhosts

machineA root
ip_addressofmachineA root
machineA.abc.com root

check nsswitch.conf and resolv.conf files for missing entries.
Bill Hassell
Honored Contributor

Re: rlogin without a password prompt in linux

Very common problem. The issue is that gethostbyname is returning different results in each of your machines. This is controlled by several config files like /etc/hosts, /etc/resolv.conf, /etc/nsswitch.conf and of course your DNS server. To get arounf the problem, put each of the machines into .rhosts 3 different ways:

machine_a someuser
machine_a.mydomain.com someuser
12.34.56.78 someuser

where 12.34.56.78 is the IP address of machine_a. The 'r' daemons perform some trivial security checks to validate the remote system and differences in name resolution in each machine will cause this problem.


Bill Hassell, sysadmin