HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Suggest HOWTO (http://www.howtoforge.com/forums/forumdisplay.php?f=9)
-   -   blocking ssh for a particular user (http://www.howtoforge.com/forums/showthread.php?t=4062)

jithesh 4th May 2006 09:41

blocking ssh for a particular user
 
can any one tell me how to block a particular users ssh login.But when he logs in locally it should happen.
thank you

falko 4th May 2006 11:03

If the user has a static IP address, you can add

Code:

sshd: 12.34.56.78
to /etc/hosts.deny. Replace 12.34.56.78 with the user's static IP address.

santhanamt 26th March 2009 12:29

Blocking, Allowing users for SSH
 



vim /etc/ssh/sshd_config

# To allow only certain users >> Allows only user1 and user2 to login via SSH

AllowUsers user1 user2 user3

# To block certain users >> Blocks only user5 and user6

DenyUsers user5 user6



topdog 26th March 2009 16:27

You can use allowed group as well, that way you just add users to the group.

Code:

AllowGroups <group_name>


All times are GMT +2. The time now is 23:52.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.