Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Originating-IP: [69.143.114.19] X-Originating-Email: [rdd37it AT hotmail DOT com] X-Sender: rdd37it AT hotmail DOT com From: "RDD" To: Cc: References: <41899277 DOT 77F11DE1 AT dessent DOT net> Subject: Re: Can Cygwin sshd log to a file? (as opposed to Event Log) Date: Wed, 3 Nov 2004 23:26:04 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-ID: X-OriginalArrivalTime: 04 Nov 2004 04:22:02.0273 (UTC) FILETIME=[D5617910:01C4C225] X-IsSubscribed: yes Thank you very much for your help, Brian (& list) -- I was looking in all the wrong places, but got it set up correctly now (through editing the registry entry). Much appreciated, Bob ----- Original Message ----- From: "Brian Dessent" To: Sent: Wednesday, November 03, 2004 9:22 PM Subject: Re: Can Cygwin sshd log to a file? (as opposed to Event Log) > RDD wrote: > > > > Hello all -- > > > > I've modified the Logging section of cygwin\etc\cygserver.conf as follows: > > > > # kern.log.syslog: Determines whether logging should go to the syslog, > > # Default is "yes", if stderr is no tty, "no" otherwise. > > # Command line option -y, --syslog or -Y, --no-syslog. > > kern.log.syslog --no-syslog > > > > # kern.log.stderr: Determines whether logging should go to stderr, > > # Default is "yes", if stderr is a tty, "no" otherwise. > > # Command line option -e, --stderr or -E, --no-stderr. > > kern.log.stderr no > > > > I would like to get the SSH server to log events (failed logins, etc.) to a > > simple text file, such as sshd.log under cygwin\var\log. Is this possible? > > Or is this only a 'dummy' file, and Event Log in the only option for logging > > on Windows (Win2k in this case)? > > You're barking up the wrong tree here with cygserver.conf. THat is the > configuration file for cygserver, which is a helper application to > provide shared memory, queues, semaphores, and various other things. > See /usr/share/doc/Cygwin/cygserver.README for details. It has > absolutely nothing to do with sshd, or running services in general. > > What you want to do is provide the "-e" argument to sshd when it starts > up. From "man sshd": > > -e When this option is specified, sshd will send the output to > the > standard error instead of the system log. > > (In windows, syslog = windows event log) > > To do this you can either remove the service and reinstall it with the > new arguments (both with cygrunsrv) or you can just go into the registry > and edit the command line there. Look at the ssh-host-config file for > how cygrunsrv is used to install the service, if you want to duplicate > its options. > > Cygrunsrv is the program that allows daemons to run as services, and it > will redirect stderr and stdout of the daemon to a file. From > "cygrunsrv -h": > > -0, --stdin Optional input file used for stdin > redirection. > Default is /dev/null. > -1, --stdout Optional output file used for stdout > redirection. > Default is /var/log/.log. > -2, --stderr Optional output file used for stderr > redirection. > Default is /var/log/.log. > > You will either need to specify -2 to cygrunsrv with the name of the log > file you want, or accept the default /var/log/sshd.log. > > Brian > > -- > 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/ > > -- 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/