This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: HowTo setup cygwin + sshd using hosts.allow and hosts.deny and use detailed logging
- From: René Berber <r dot berber at computer dot org>
- To: cygwin at cygwin dot com
- Date: Thu, 31 Jan 2008 17:03:46 -0600
- Subject: Re: HowTo setup cygwin + sshd using hosts.allow and hosts.deny and use detailed logging
- References: <000601c86459$ff0bf5e0$ac399905@a3500>
Martin wrote:
[snip]
1.) ssh-host-config with User Separation and install as a service
2.) syslogd-config
3.) Installed Denyhosts by issuing the command as Administrator
Administator? I don't think that's needed, the installation is on
Cygwin, Windows doesn't care about special administrator privileges in
this case.
python setup.py install
followed the first steps in the readme of denyhosts
and edited denyhost.cfg and daemon-control
denyhosts.cfg changes:
commented out the line for Red Hat
and activate the following line
SECURE_LOG = /var/log/messages
Make sure the following is also set:
SYSLOG_REPORT=YES
And also activated this one:
LOCK_FILE = /var/run/denyhosts.pid
OK so far - fine
When I try to start denyhosts by hand with this:
/usr/bin/denyhosts.py --daemon --config=/usr/share/denyhosts/denyhosts.cfg
Everything is fine and denyhosts is running
What about the command used by cygrunsrv:
"/usr/share/denyhosts/daemon-control start" ?
But if I try to start it as a service it immediately stops after starting!
I installed the service with your suggestion:
cygrunsrv -I DenyHosts -p /usr/share/denyhosts/daemon-control -a start -d
DenyHosts -f "DenyHosts 2.6" -y sshd -x /var/run/denyhosts.pid -o
I have looked into the /var/log/messages logfile when I start denyhosts as a
service - looks like this:
Jan 31 23:28:33 yello-server DenyHosts: PID 3868: `DenyHosts' service
stopped, exit status: 255
I have tried to run denyhosts as SYSTEM or as Administrator in the services
config - but with no luck!
What I have done wrong?
Nothing I can see, unless it's a very obvious "No Cygwin in global
PATH", i.e. not the Cygwin PATH you see in the terminal, but the Windows
PATH environment variable set in Computer -> Properties -> Advanced ->
Environment Variables.
Try enabling the log, and then see the last few lines of
/var/log/denyhosts.log .
--
René Berber
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/