Rationale for an absence of a native file-logging configuration option for OpenSSH-Server

Jim Knoble jmknoble at pobox.com
Wed May 11 02:56:07 EST 2011


You need sshd -D -e.

For log rotation without restarting sshd, use something like 
http://cr.yp.to/daemontools/multilog.html :

     mkdir /var/log/sshd
     sshd -D -e 2>&1 |multilog t /var/log/sshd

is a simple example to send sshd messages to /var/log/sshd/current.

-- 
jim knoble  |  jmknoble at pobox.com  |  http://www.pobox.com/~jmknoble/

On 2011-05-10 08:12, Ángel González wrote:
> Daniel Kahn Gillmor wrote:
>> You can use sshd's -e option to send logs to stderr, while mapping the
>> stderr file descriptor (fd 2) to whatever native file (or process) you like.
>>
>> Does this solve your problem?
>>
>> Note that if you plan to rotate your logs, you may need to restart sshd
>> at the appropriate time.
>>
>> hth,
>>
>> 	--dkg
> I don't think that's enough. I was recently in such situation, and the
> logging
> stopped after a few lines. Seemed that after forking the child closed
> the descriptor.
> So the real problem, that happened later, was not being recorded.
>
>
> _______________________________________________
> openssh-unix-dev mailing list
> openssh-unix-dev at mindrot.org
> https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
>


More information about the openssh-unix-dev mailing list