BSD Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsOperating SystemsBSD Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 16th, 2006, 03:43 PM
CyBerHigh CyBerHigh is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 461 CyBerHigh User rank is Sergeant (500 - 2000 Reputation Level)CyBerHigh User rank is Sergeant (500 - 2000 Reputation Level)CyBerHigh User rank is Sergeant (500 - 2000 Reputation Level)CyBerHigh User rank is Sergeant (500 - 2000 Reputation Level)CyBerHigh User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 4 Days 12 h 36 m 28 sec
Reputation Power: 24
Send a message via AIM to CyBerHigh
Locking certain users out of ssh login

I want to set up a ssh server so that only certain users can log in. I would like to have some type of file that I can just list the usernames that can login via ssh and if they are not in that list they are not allowed to log in. I am using freeBSD and openSSH. I just can't seem to find any options like above in configuration files.
__________________
My Site:
http://www.coryhardman.com

Reply With Quote
  #2  
Old January 16th, 2006, 04:00 PM
Scorpions4ever's Avatar
Scorpions4ever Scorpions4ever is offline
Banned ;)
Dev Shed God 9th Plane (9000 - 9499 posts)
 
Join Date: Nov 2001
Location: Woodland Hills, Los Angeles County, California, USA
Posts: 9,406 Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Months 10 h 17 m 19 sec
Reputation Power: 4080
Simply change the shell of those you don't want to log in to /sbin/nologin. man chsh or vipw for more details.
__________________
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne

Reply With Quote
  #3  
Old March 29th, 2006, 06:20 PM
crxgames crxgames is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: Kentucky
Posts: 59 crxgames User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 13 m 58 sec
Reputation Power: 10
Open up sshd_config and add
DenyGroups groupname

Then create a group called groupname(or whatever you used instead) and add all non allowed users into it.

Reply With Quote
  #4  
Old March 29th, 2006, 08:05 PM
CyBerHigh CyBerHigh is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 461 CyBerHigh User rank is Sergeant (500 - 2000 Reputation Level)CyBerHigh User rank is Sergeant (500 - 2000 Reputation Level)CyBerHigh User rank is Sergeant (500 - 2000 Reputation Level)CyBerHigh User rank is Sergeant (500 - 2000 Reputation Level)CyBerHigh User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 4 Days 12 h 36 m 28 sec
Reputation Power: 24
Send a message via AIM to CyBerHigh
is there anything like AllowGroups, which will only allow users in the ground that I choice and deny everyoe else

Reply With Quote
  #5  
Old April 1st, 2006, 09:42 PM
rycamor rycamor is offline
Gödelian monster
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jul 1999
Location: Central Florida, USA
Posts: 2,306 rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 3 Days 6 h 42 m 51 sec
Reputation Power: 60
When in doubt...

#man sshd_config

Works wonders. Since AllowGroups starts with A, you will actually see it without scrolling. Always 'man' the thing you are wondering about. 9 times out of 10 FreeBSD has a manpage for it.
__________________
The real n-tier system:

FreeBSD -> PostgreSQL -> [any_language] -> Apache -> Mozilla/XUL

Amazon wishlist -- rycamor (at) gmail.com

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsBSD Help > Locking certain users out of ssh login

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap