[NTLUG:Discuss] Hook SSHD into sendmail milter?

Chris Cox cjcox at acm.org
Wed Jul 13 02:17:59 CDT 2005


Greg Edwards wrote:
> Neil Aggarwal wrote:
>>
>> Is there a way to configure sshd to call a program to check whether
>> an IP is allowed or not?
>>
>> I see that hosts_access in section 3 of the man pages has
>> this function:
>>
>> int hosts_ctl(daemon, client_name, client_addr, client_user)
>>        char *daemon;
>>        char *client_name;
>>        char *client_addr;
>>        char *client_user;
>>
>> Is there a way to get sshd to call a program I write that implements
>> this method?
>>
>> Thanks,
>>     Neil
>>
> 
> Wouldn't it be easier to do through your firewall?  Or are these IPs 
> inside?  Using an iptables rule to reject those addresses should get the 
> trick done, if you're interested in that option.
> 
> I've got the SSH book on the shelf, but haven't read it yet so I 
> couldn't help with that.
> 

man sshd_config
Look for AllowUsers

Won't that work for you?





More information about the Discuss mailing list