n***@sinet.ca
2015-11-04 21:52:50 UTC
You might try looking at the normal proftpd system logging (e.g. via
syslog, or via the SystemLog directive). The mod_sftp module tries to
log its authentication messages using the same logging as the main FTP
engine, which means using syslog/SystemLog.
TJ, sorry about the slow response - travelling without easy access to mysyslog, or via the SystemLog directive). The mod_sftp module tries to
log its authentication messages using the same logging as the main FTP
engine, which means using syslog/SystemLog.
server. I originally had set up ExtendedLog and SFTPlog in the virtual
host that I had created for SFTP access. I have removed those options -
the only logging that I can see now is to /var/log/messages and
/var/log/secure. SFTP is set up to only allow login with keys. I did a
test where I logged in with a valid user/key pair and then logged in with
the same key but a different user. Both attempts are logged to
/var/log/messages but there is no obvious indication that the second
attempt failed. Only the successful login was recorded in
/var/log/secure.
[***@aws log]# tail -f messages
Nov 4 14:53:11 aws proftpd[24126]: 0.0.0.0 (::ffff:(host ip)[::ffff:(host
ip)]) - FTP session opened.
Nov 4 14:53:13 aws proftpd[24126]: 0.0.0.0 (::ffff:(host ip)[::ffff:(host
ip)]) - Preparing to chroot to directory '(root directory'
Nov 4 14:53:32 aws proftpd[24126]: 0.0.0.0 (::ffff:(host ip)[::ffff:(host
ip)]) - SSH2 session closed.
Nov 4 14:54:29 aws proftpd[24128]: 0.0.0.0 (::ffff:(host ip)[::ffff:(host
ip)]) - FTP session opened.
Nov 4 14:54:29 aws proftpd[24128]: 0.0.0.0 (::ffff:(host ip)[::ffff:(host
ip)]) - SSH2 session closed.
[***@aws log]# tail -f secure
Nov 4 14:53:13 aws proftpd[24126]: 0.0.0.0 (::ffff:(host ip)[::ffff:(host
ip)]) - USER (username): Login successful
Nov 4 14:53:13 aws proftpd[24126]: 0.0.0.0 (::ffff:(host ip)[::ffff:(host
ip)]) - USER (username): Login successful.
I am running ProFTPD Version 1.3.3g and the associated mod_sftp.so. The
proftpd.conf file is fairly standard except for the addition of the
VirtualHost for the port I am using to support SFTP access. I set
SFTPAuthMethods publickey and restricted SFTP protocols v1 through v3 for
WinSCP. I had enabled ExtendedLog directives earlier but these also did
not produce a clear one-line message that I could use to detect when
authentication failed. The closest was the SFTPLog file that showed "Nov
03 19:47:51 mod_sftp/0.9.7[4334]: client sent SSH_DISCONNECT message: No
supported authentication methods available (No other authentication
mechanisms available)" but did not include the IP address of the client.
Thanks, Norbert