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
  #2  
Old 4th May 2006, 12:03
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,853
Thanks: 781
Thanked 1,558 Times in 1,477 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
--
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,134
Thanks: 0
Thanked 126 Times in 123 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 - Bespoke consulting & support

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
how to "kick" a shell user Tenaka 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
Statistic not working mzo Installation/Configuration 13 24th February 2006 13:12
Website users? ctroyp General 25 6th January 2006 19:02


All times are GMT +2. The time now is 12:09.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Sponsored Links: Unified Communications: Thoughts, Strategies and Predictions
Join the discussion.
www.seamlessenterprise.com

IP Convergence
Integrate your wireless and wireline networks.
Learn how from the experts at Sprint.
www.seamlessenterprise.com

Wireless & Wireline Integration
Thoughts, strategies and solutions: join the discussion
www.seamlessenterprise.com

Unified Communications 2009
Join the Discussion. Now.
www.seamlessenterprise.com

Red Hat Virtual Experience - a free virtual event. Dec. 9th