Back to Top

Deny ssh access for certain users in Linux

Updated 5 June 2014

As we all know that opening ssh for all users is not good foe security reasons.

So to deny ssh access for certain users we have to

Just edit sshd_config located under /etc/ssh/  (location can be different depending upon version of linux )

Add the line

DenyUsers username1 username2

Start your headless eCommerce
Find out More

save and exit

then restart the service

# /etc/init.d/sshd restart


Now the users username1 and username2 will be denied.


. . .

Leave a Comment

Your email address will not be published. Required fields are marked*

Be the first to comment.

Back to Top

Message Sent!

If you have more details or questions, you can reply to the received confirmation email.

Back to Home