disable telnet on Solaris

All -

would you please some one help me to disable telnet on Solaris?

/etc/inetd.conf

Thanks :confused:

Open the /etc/inetd.conf file in an editor of your choice. Search for the line that contains info for the telnet services. Comment that line out (by inserting a '#' as the very first character of that line). Then run this command:

pkill -HUP inetd

Note that you have to be root to do this.

i see this line.

#telnet stream tcp6 nowait root /usr/sbin/in.telnetd in.telnetd

if i run this command, do i kill ftp also?

Thanks

Is this the only line in the inetd.conf that refers to telnet? If yes, then telnet is already disabled on your system. Can you try connecting to your system using telnet? And about the ftp, you have to # out that line too if you want to disable it.

Thanks. I'll try it

you can also try:

svcs telnet

if it shows telnet is enabled , then disable it with the following command:

svcadm disable telnet

(note: This command is only for Solaris 10) :cool:

I used Solaris 8. I'll keep in mind.

Thanks a lots.

Would this disable telnet across reboots?

Yes. If you wanted to disable for just this session (back on after reboot), you'd have to run

# svcadm disable -t svc:/network/telnet

Carl

You should also comment out the telnet pam modules in pam.conf.

On my Solaris 10 box, I don't have any telnet pam modules. There are Kerberos Telnet modules. Is that what you mean? And why comment them out?

Carl

You want to safefguard from another admin or priv user from just starting up the telnet deamon. Sun Best practices includes this additional pam mod step.