Quantcast
Channel: Webkul Blog
Viewing all articles
Browse latest Browse all 5556

Deny ssh access for certain users in Linux

$
0
0

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

save and exit

then restart the service

# /etc/init.d/sshd restart

 

Now the users username1 and username2 will be denied.

 


Viewing all articles
Browse latest Browse all 5556

Latest Images

Trending Articles



Latest Images