Enabling and Disabling telnet service on Solaris

For security purposes, administrators may wish to disable telnet on a given Solaris system. This article provides the simple steps necessary to perform this task under Solaris 8 & 9 (updated for Solaris 10 & Solaris 11)

Solaris 8 and Solaris 9

  • Confirm telnet is enabled or disabled:
    # grep telnet /etc/inetd.conf
    telnet   stream  tcp  nowait  root  /usr/sbin/tcpd  in.telnetd
    If the telnet string is commented out (preceeded with #), then telnet is disabled else it is enabled.

  • To disable telnet, edit /etc/inetd.conf and comment out the telnet string, ie:
    #telnet  stream  tcp  nowait  root  /usr/sbin/tcpd  in.telnetd
    then run
    # kill -HUP inetd
  • To enable telnet, edit /etc/inetd.conf and uncomment the telnet string, ie
    telnet  stream  tcp  nowait  root  /usr/sbin/tcpd  in.telnetd
    then perform
    # kill -HUP inetd

Solaris 10

  • Confirm telnet is enabled or not
    # inetadm | grep telnet
    enabled   online         svc:/network/telnet:default
  • To disable telnet, perform:
    # inetadm -d telnet
  • To enable telnet, perform:
    # inetadm -e telnet
  • To list details about telnet:
    # inetadm -l telnet

Solaris 11

  • Confirm state of telnet:
    # svcs -a | grep telnet
  • To disable telnet, perform:
    # svcadm disable  svc:/network/telnet:default
  • to enable telnet, perform:
    # svcadm enable  svc:/network/telnet:default
  • To list details about telnet:
    # svcs -l svc:/network/telnet:default
    # svcs -xv svc:/network/telnet:default