Unix : How to enable ssh and disable telnet on solaris

This item was filled under [ Interview Help Solaris, Solaris ]

Yesterday, I was asked to enable ssh and disable telnet on few Solaris 10 servers. For those who do not know the reason for this change activity, telnet is a bit dubiuos protocol and all the data sent over telnet is not secure. To keep a check on security aspect, use of ssh is recomended as data transmitted over ssh protocol is encrypted. Anyways lets get into it.

So how to enable and disable ssh and telnet protocols. This is 4 command task if all the enteries are good with /etc/ssh/sshd-config file and /etc/default/login. For start just check /etc/default/login file and check whether root user can login from remote location or not. There will be entry like ” #CONSOLE = /dev/console
In this condition root can login locally as well as remotely”.
Make sure that this line is commented.

Second thing check whether ssh access to root user is enabled or not, because after all the protocol management will be done by root user only. So open file “/etc/ssh/sshd-config” file and check for entry for root login. Quick search “/Are”, locate the second result with this string. Entry will be like “rootlogin no/yes”. Make the entry yes.

Now third part is to check status of telnet and disable it, if the service is running. Issue command:
#svcs telnet
If it is disabled, well and good, but if it is enabled, issue following command:
#svcadm disable telnet
Recheck the status and confirm the disabling of service.

Last part is to enable ssh, follow same procedure as of telnet.
#svcs ssh
Enable if it is diable.
#svcadm enable ssh

You can check the change by logging into system by client like puTTy, Xmanager etc. Make sure to check the above specified enteries regarding sshd and default login filw before enabling and disabling any protocol.

The above mentioned steps are for Solaris 10, you can start or stop a particular protocol by changing the respective daemons in Solaris 9. Like for disabling and enabling telnet use:
#/etc/init.d/telnetd start
#/etc/init.d/telnetd stop

For disabling or enabling ssh daemon use
#/etc/init.d/sshd start
#/etc/init.d/sshd start

  • Share/Bookmark
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

3 Comments on “Unix : How to enable ssh and disable telnet on solaris”

  • aamirNo Gravatar
    16 February, 2009, 20:24

    Great Help for beginners,
    Thanks, keep it up.

    MAZ

  • eheuristicNo Gravatar
    1 July, 2009, 10:31

    Thank you for giving such great info thank’s again what a great job
    good luck for your bright future.

  • ConradNo Gravatar
    25 August, 2009, 12:03

    Editing the parameter CONSOLE=/dev/console in /etc/default/login seems to control ‘rlogin’ only, so for SSH I only needed edit /etc/ssh/sshd_config. Thanks for the Tip.

Leave a Comment

  • Google Translator

      Translate to: