Block telnet and ssh access to user


In solaris you can stop root access except for the console (/etc/default/login)

Is there any way you can do this for normal users and only allow 'su' to that user - lets say only give 'user1' console access and user2 needs to 'su - user1' to gain access


Who is Participating?
alextoftConnect With a Mentor Commented:
Agree regarding telnet. I'd just switch it off.

The SSH config files are in the same place as with Linux. /etc/ssh/sshd_config and you can use the DenyUsers directive to prevent specified users from logging in via ssh. Obviously remember to do a quick svcadm restart network/ssh to activate changes to the config file.
I'd not use telnet at all, as it is insecure, so don't start that daemon. I don't use Solaris, but it is probably similar to linux, which I do use. You can get a copy of webmin and manage SSH and other settings using it. This will change the settings in your sshdconfig file.
mickgeAuthor Commented:
dont know why I mentioned telnet in my subject as I already disabled that in /etc/inetd.conf

Alex - adding the user to the 'DenyUsers' directive in sshd_config worked like a treat

Thanks for all your help

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.