Post

Log SCP/SFTP traffic - Ubuntu

We can log the file access through scp/sftp using the below  sshd configuration.

Need to edit /etc/ssh/sshd_config  and add “-l DEBUG” at the end of the line.

1
Subsystem sftp  /usr/lib/openssh/sftp-server -l DEBUG

/etc/init.d/ssh restart

Once the service is restarted the logs will be available in /var/log/auth.log

This post is licensed under CC BY 4.0 by the author.