Open sftp log
How to log files uploaded and deleted through SFTP? it can be like this:
1. Modify the SSH configuration:
Vim / etc/ssh/sshd_config
# modify
Subsystem sftp / usr/lib64/ssh/sftp-server-l INFO-f AUTH
two。 Modify rsyslog
Vim / etc/rsyslog.conf
# add one line
Auth,authpriv.* / var/log/sftp.log
3. Check / var/log/sftp.log after reboot
/ etc/init.d/rsyslog restart
/ etc/init.d/sshd restart
Cat / var/log/sftp.log