- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Allow only certain groups to ssh
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2005 08:21 PM
тАО03-27-2005 08:21 PM
Allow only certain groups to ssh
A simple script was written in the /etc/profile to verify whether the login account should be given a shell prompt for telnet service.
Is there a way to do this in ssh service?
Thanks in advance,
YC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2005 09:56 PM
тАО03-27-2005 09:56 PM
Re: Allow only certain groups to ssh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-28-2005 05:19 AM
тАО03-28-2005 05:19 AM
Re: Allow only certain groups to ssh
you can modify sshd config file:
/etc/ssh/sshd_config
and change parameters:
AllowGroup or AllowUsers
Look at: man sshd_config for details
Ps,
after changing you have to restart sshd deamon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-28-2005 05:59 AM
тАО03-28-2005 05:59 AM
Re: Allow only certain groups to ssh
The file sshd_config (do a find / -name sshd_config to check the file location) edit that file & modify the parameters for AllowUsers & save it, restart the ssh daemon.
Rgds
HGN
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-28-2005 01:47 PM
тАО03-28-2005 01:47 PM
Re: Allow only certain groups to ssh
(1) allow the whole of the developement group, deny all groups
(2) allow a few users not belong to the developement group.
I tried to put in the following in the ssd_config:
:
AllowGroups dev
AllowUsers abc
:
Non of the user in dev group can login as well as user abc.
AllowGroups and AllowUsers are mutually exclusive.
Any idea or pointer to achieve the rule?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-28-2005 03:54 PM
тАО03-28-2005 03:54 PM
Re: Allow only certain groups to ssh
Are you able to ssh without using these parameters? first try to check the by-default behaviour of ssh configuration, by removing the allowuser and allowgroup lines you have added. if you are not able to ssh even after removing the lines, there is some other problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-28-2005 04:32 PM
тАО03-28-2005 04:32 PM
Re: Allow only certain groups to ssh
Tested no problem with only AllowGroups is inserted.
Tested no problem with only AllowUsers is inserted.
Tested not working if both AllowGroups and AllowUsers are inserted together.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-28-2005 04:33 PM
тАО03-28-2005 04:33 PM
Re: Allow only certain groups to ssh
Tested no problem with only AllowGroups is inserted.
Tested no problem with only AllowUsers is inserted.
If both AllowGroups and AllowUsers are inserted together. No one can login using ssh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-29-2005 06:21 PM
тАО03-29-2005 06:21 PM
Re: Allow only certain groups to ssh
I'm not very sure, but I think if you use both credentials, it makes an AND rule ( both conditions must match, means, the user must be of the group you allowed). Again, right now I do not have any Linux box around me to test it, so not very sure about it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-29-2005 06:41 PM
тАО03-29-2005 06:41 PM
Re: Allow only certain groups to ssh
if user in denyusers
deny
if #allowusers > 0 and user not in allowusers
deny
if user group in deny groups
deny
if #allowgroups > 0 and user group not in allowgroups
deny
So you can use either AllowUsers or AllowGroups but not both.
Perphaps you can use AllowGroups only. For users that are not part of the groups specified in AllowGroups, put them in a separate group (e.g. ssh_allow) and specify that group (ssh_allow) on the AllowGroups line.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-31-2005 05:14 AM
тАО03-31-2005 05:14 AM
Re: Allow only certain groups to ssh
If you need a login that just runs a particular command, I've always used smrsh. Not a panacea, but it is useful sometimes.
Or just make a copy of bash, make its permissions 750, set up a group with the approved users, and set their login shell to the copy of bash?