Hi Nick,

You can register a new event listener by extending this class
https://github.com/apache/mina-sshd/blob/master/sshd-core/src/main/java/org/apache/sshd/server/subsystem/sftp/AbstractSftpEventListenerAdapter.java
for the events upon which you want to listen (e.g. init) then adding it to
your SftpSubsystemFactory
https://github.com/apache/mina-sshd/blob/master/sshd-core/src/main/java/org/apache/sshd/server/subsystem/sftp/SftpEventListenerManager.java#L39

On Wed, May 4, 2016 at 6:43 AM, Nick L <nickle...@gmail.com> wrote:

> Hi all,
>
> I've just started working with SSHD and have some test code working. I'd
> like to record each time a client connects to the ssh server, even if they
> don't authenticate. I realise I can check getActiveSessions(), but as this
> is a 'live' status, I will miss any connections that have already closed.
>
> Is there a recommended way to listen to the active sessions and receive a
> notification when a new session is created?
>
> Thanks
>
> Nick
>

Reply via email to