How to enable sftp logging in macOS Monterey and Ventura?
I'd like to enable logging of ssh and sftp logins and file transfers.
After perusing the man page for sftp-server, I tried uncommenting the line in /etc/ssh/sshd_config:
#Subsystem sftp /usr/libexec/sftp-server
and modifying it to:
Subsystem sftp /usr/libexec/sftp-server -f AUTH -l DEBUG
After restarting (altho I shouldn't need to), ssh/sftp no longer functions:
▶ ssh user@mymac.lan
kex_exchange_identification: read: Connection reset by peer
Connection reset by <server IP address on lan> port 22
When that line is commented out, ssh/sftp is restored (no restart req'd)
I did try adding this to /etc/syslog.conf:
auth.*
But to no avail.
Watched syslog during attempts to enable logging, but no errors were generated.
Can anyone help out?
iMac 27″