Unix : How to enable ssh and disable telnet on 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





3 Comments on “Unix : How to enable ssh and disable telnet on solaris”
Great Help for beginners,
Thanks, keep it up.
MAZ
Thank you for giving such great info thank’s again what a great job
good luck for your bright future.
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.