Operating System - HP-UX
1829101 Members
2295 Online
109986 Solutions
New Discussion

How should i disable rsh remote shell in Hpux

 
Santhosh_Mani
Occasional Contributor

How should i disable rsh remote shell in Hpux

I am trying to comment the remsh line in /etc/inetd.conf like #/usr/bin/remsh

And then i tried rsh its connecting because that is restricted shell.

Eventhough am commenting in /inetd.conf its connecting the remote connection.So how to avoid remote shell connection.

And what is the relation between rsh and remsh.

Becasue after disabling  in inetd.conf also its connecting.

2 REPLIES 2
ranganath ramachandra
Esteemed Contributor

Re: How should i disable rsh remote shell in Hpux

Please read the man pages for remsh, remshd and rsh.

From the remshd(1M) man page, it seems that you might need to comment out 2 lines in inetd.conf, one beginning with "shell" and the other with "kshell".  After this, I suspect you would have to restart inetd, like

/sbin/init.d/inetd stop
/sbin/init.d/inetd start

On HP-UX, "rsh" is "restricted shell" and "remsh" is "remote shell". On other UNIXes, "rsh" is "remote shell". Otherwise, rsh is not related to remsh.

 
--
ranga
hp-ux 11i v3[i work for hpe]

Accept or Kudo

Patrick Wallek
Honored Contributor

Re: How should i disable rsh remote shell in Hpux

To disable all r* commands in HP-UX you must comment out these 3 lines in the /etc/inetd.conf:

 

login        stream tcp nowait root /usr/lbin/rlogind  rlogind -B /etc/issue
shell        stream tcp nowait root /usr/lbin/remshd   remshd
exec         stream tcp nowait root /usr/lbin/rexecd   rexecd

 

Once you have done that you can force inetd to reread the /etc/inetd.conf configuration file by issuing the command:

 

# inetd -c