Freebsd – syslog config for sftp logging

freebsdloggingsftp

I'm on FreeBSD11. I changed syslog config file to log sftp actions in a file, but it doesn't work.

/etc/ssh/sshd_config

Subsystem       sftp    /usr/libexec/sftp-server -f LOCAL5 -l INFO

/etc/syslog.conf

local5.info                                        /var/log/sftp/sftp.log

Then I restart the services, but any action saved in sftp.log and it's empty.

Thank you for your help.

Best Answer

This never worked in OpenSSH upstream package. It is for several reasons:

  • You don't have /dev/log socket that is used to send log messages to the syslog (if you have, you didn't mention it in the question)
  • There is possibility to use the "parent" process socket that is not in chroot to log your events, but