Block telnet and ssh access to user

Posted on 2006-05-19
Last Modified: 2012-05-05

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


Question by:mickge
    LVL 87

    Expert Comment

    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.
    LVL 19

    Accepted Solution

    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.

    Author Comment

    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


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Suggested Solutions

    Title # Comments Views Activity
    Admin account lockout issue 2 230
    Monitoring LINUX with SCOM 2012 12 77
    Vmware  OVA template question 33 92
    AS400 Logging Print device 2 65
    In a recent article here at Experts Exchange (, I discussed my nine-month sandbox testing of the Windows 10 Technical Preview, specifically with respect to r…
    I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension ( This reminded me of questions tha…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now