sftp and wtmp support

Heikki Orsila heikki.orsila at iki.fi
Wed Dec 2 03:09:00 AEDT 2020


Hello OpenSSH developers and users!

My client uses wtmp information to determine past logins though ssh into
their production environment. It seems sftp does not write into wtmp, and
thus, it is not possible to list past sftp sessions. To make this happen
I can see several options:

1. We write a custom tool to analyze auth.log to determine past sessions.
This is not useful for ssh community in general.

2. We create an sftp wrapper tool that writes to wtmp and executes sftp-server
by setting "Subsystem sftp /usr/lib/openssh/sftp-server" as the
wrapper executable in sshd_config.

3. We write an extension to sshd that can be enabled with a configuration
variable that instructs sftp to write to wtmp so that it would do it by
default.

Are there concerns about option 3? Could such a feature be accepted into
sftp?

Thanks!

Best regards,

Heikki Orsila


More information about the openssh-unix-dev mailing list