Many classic services are controlled by the inetd daemon (in Solaris 9 and below). To disable telnet or any other service under the control of inetd, modify the inetd.conf and restart the inetd daemon:
- Comment-out the telnet line in /etc/inetd.conf:
- Determine the process ID of the inetd daemon:
- Restart the inetd daemon:
# TELNETD - telnet server daemon # telnet stream tcp6 nowait root /usr/sbin/in.telnetd in.telnetd
# ps -ef | grep inetd root 139 1 0 15:45:30 ? 0:00 /usr/sbin/inetd -s
# kill -HUP 139
The procedure is much simpler in Solaris 10:
# inetadm -d svc:/network/telnet:default