Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Suggest HOWTO

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 4th May 2006, 10:41
jithesh jithesh is offline
Junior Member
 
Join Date: May 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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
Reply With Quote
Sponsored Links
  #2  
Old 4th May 2006, 12:03
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,749 Times in 2,579 Posts
Default

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.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 26th March 2009, 13:29
santhanamt santhanamt is offline
Junior Member
 
Join Date: Mar 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Cool 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


Reply With Quote
  #4  
Old 26th March 2009, 17:27
topdog topdog is offline
Senior Member
 
Join Date: Jan 2008
Location: South Africa
Posts: 1,352
Thanks: 0
Thanked 154 Times in 151 Posts
 
Default

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

Code:
AllowGroups <group_name>
__________________
----
http://www.topdog.za.net - Got Linux problems ? - I can help.
http://www.baruwa.org - Try it.

Last edited by topdog; 26th March 2009 at 17:30.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Statistic not working mzo Installation/Configuration 49 20th April 2011 13:19
how to "kick" a shell user Ovidiu Server Operation 12 16th June 2008 23:56
User deleted from user groups bogdinator General 2 28th March 2006 22:26
how to delete user - it's a ghost Cirox Installation/Configuration 3 19th March 2006 23:25
Website users? ctroyp General 25 6th January 2006 19:02


All times are GMT +2. The time now is 13:49.


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