Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Open sftp log

Shulou Source: shulou.com Published: 2022-06-01 07:30:01 10月03日 Update

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

Tags: Log one line file configuration Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Apple macOS vpn MariaDB