Comment 3 for bug 705050

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 705050] Re: codehosting ssh access log "failed to authenticate" does not include username

On 19 January 2011 19:29, Michael Hudson-Doyle
<email address hidden> wrote:
> I think this might be a little tricky to achieve, sadly.
>
> The failed to authenticate message is produced when the client
> disconnects without authenticating.  Which usernames were presented is
> known by the "UserDetailsMind" object, which is attached to the
> SSHUserAuthServer object.  So I guess we need to somehow record on the
> transport passed to SSHUserAuthServer.__init__ the usernames that have
> been recorded, and read them out again in
> lp.services.sshserver.service.Factory.connectionLost (maybe a
> WeakKeyDict mapping transports to lists of usernames?)

Couldn't we just log them at the time the username is sent, and then
later log that the same client disconnected?

--
Martin