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:


  1. Comment-out the telnet line in /etc/inetd.conf:
  2.   # TELNETD - telnet server daemon
      # telnet stream  tcp6    nowait  root    /usr/sbin/in.telnetd    in.telnetd
    
    
  3. Determine the process ID of the inetd daemon:
  4. # ps -ef | grep inetd
        root   139     1  0 15:45:30 ?        0:00 /usr/sbin/inetd -s
    
  5. Restart the inetd daemon:
  6. # kill -HUP 139
    
    

The procedure is much simpler in Solaris 10:

# inetadm -d svc:/network/telnet:default