I am trying to collect additional operation logging from my sftp server. I have added the following lines to /etc/ssh/sshd_config, as instructed by many posts on the internet:
Subsystem sftp internal-sftp -l VERBOSE -f LOCAL6
Match Group sftponly
ChrootDirectory /data/%u
ForceCommand internal-sftp -l VERBOSE -f LOCAL6
X11Forwarding no
AllowTcpForwarding no
Then I created /etc/rsyslog.d/60-sftp.conf with the following lines to collect the logging info:
# Parse the data logged at level INFO and facility LOCAL6 into /var/log/sftp
local6.* /var/log/sftp
# Report logins and logoffs
:syslogtag,startswith,"internal-sftp" /var/log/sftp
# Log internal-sftp in a separate file
:programname, isequal, "internal-sftp" -/var/log/sftp
At this point I can't seem to get any logging to make it to /var/log/sftp, it is all continuing to go to /var/log/messages and does not seem to be verbose at all. Here is a snippet of all I am getting:
Sep 28 16:46:11 ftp sshd[10060]: Accepted publickey for root from 172.25.50.117 port 54836 ssh2
Sep 28 16:46:11 ftp sshd[10060]: Received disconnect from 172.25.50.117: 11: disconnected by user
Sep 28 16:46:16 ftp sshd[10109]: Accepted keyboard-interactive/pam for account1000002664 from 172.25.50.86 port 34255 ssh2
I have verified that the system is running rsyslogd by running:
ftp:~ # ps ax | grep syslog
9205 ? Sl 0:00 /sbin/rsyslogd -c 5 -f /etc/rsyslog.conf
So, as far as I can tell, I am editing the correct files. I figure the next step is ensuring that the expected logs are being sent to local6. The goal here is to get the data necessary to output a log similar, if not exactly like the xferlog created by vsftpd.
Anyone out there have any thoughts about how to proceed? As a side note, this is running on OpenSuse 12.1.