News:

SMF - Just Installed!

Main Menu

SFTP logging doesn't work

Started by mahesh, Oct 11, 2023, 03:29 AM

Previous topic - Next topic

mahesh

Hello,
Could you tell me please has anyone encountered setting up logs for the SFTP protocol on Ubuntu 22.04? I have the following configs the SFTP server itself is working, I connect but the logs are not poured into the /var/log/sftp.log directory


cat /etc/ssh/sshd_config
Code:
Subsystem sftp /usr/lib/openssh/sftp-serverMatch User test

ForceCommand internal-sftp -f LOCAL7 -l INFO

PasswordAuthentication yes

ChrootDirectory /var/sftp

PermitTunnel no

AllowAgentForwarding no

AllowTcpForwarding no

X11Forwarding no
cat /etc/rsyslog.d/60-sftp.conf
Code:
# Create socket within chrooted directories to allow for logging

$AddUnixListenSocket /var/sftp/uploads/dev/log

# Parse the data logged at level INFO and facility LOCAL7 into /var/log/sftp.log

LOCAL7.info /var/log/sftp.log

# Report logins and logoffs

:syslogtag,startswith,"sftp-server" /var/log/sftp.log
Thanks in advance for suggestions.