not allow rlogin

does anyone know how to stop rlogin to my sunsolaris

so I have 2 machines...I can not telnet one becouse that is not allowed but I can telnet the other and do rlogin to first one..I want to stop that..

so..

telnet A from C machine - works
telnet B from C machine - does not work
but telent A from C and then rlogin B - works
that should be stopped...

any help?? please...

There are a couple of things you can look at - it matters what your servers are using and how they are set up.

You can either look into changing on server B your /etc/hosts.allow and/or /etc/hosts.deny files (if you are using tcp wrappers), OR, you can shutdown the rsh services in /etc/inetd.conf. See the man page for inetd.conf and inetd.

You can also look to see if /etc/hosts.equiv exist - it may be granting the access there.

Before changing anything - you need to understand what it may do to something that IS okay between these servers (maybe remote copy is needed so turning off all rsh services would not be the way to go).

helloo thanks for answerss...

I have on my system /etc/inetd.conf and there are lines

#
# Shell, login, exec, comsat and talk are BSD protocols.
#
shell stream/BSD tcp nowait root /usr/sbin/in.rshd in.rshd
login stream tcp nowait root /usr/sbin/in.rlogind in.rlogind
exec stream/BSD tcp nowait root /usr/sbin/in.rexecd in.rexecd
talk dgram/BSD udp wait root /usr/sbin/in.talkd in.talkd
# remove comment in next line, when using bsd sendmail and biff
#comsat dgram udp wait root /usr/sbin/in.comsat in.comsat

so if I put # in front of login...should I deny by that rlogin to my machine or ...??
also my sun solaris does not have /etc/hosts.equiv...and there are no
/etc/hosts.allow and /etc/hosts.deny files...

thanks

looking forward of hearing answers...

Before you comment out anything, make sure you have a way to the system (such as console) in case changing it cuts off all access. Suggest you start a session onto the box on console as root so you can back out of any change in case it does more than just remove rlogin.