Operating System - HP-UX
1834009 Members
4278 Online
110063 Solutions
New Discussion

restricting ssh user@hosts

 
Bill Costigan
Honored Contributor

restricting ssh user@hosts

I'm trying to figure out how to configure sshd_config without much luck.

I want to allow the following

all users except user1 and user2
however I will accept user1 if they come from hosts a or b and user2 if they comes from hosts c or d.

It doesn't look the AllowUser can override the DenyUser. I was hoping to do something like;

DenyUser user1 user2
AllowUser user1@a user1@b user2@c user2@d

Thanks
1 REPLY 1
Steven E. Protter
Exalted Contributor

Re: restricting ssh user@hosts

Shalom,

You may be better off trying to use a product like tcp wrappers to restrict access by this service and incoming IP address.

This document may help with your original idea:

http://www.cyberciti.biz/tips/openssh-deny-or-restrict-access-to-users-and-groups.html

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1243033

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com