You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@mina.apache.org by "Wright, Omari" <Om...@solers.com> on 2012/06/04 21:38:59 UTC
[Apache SSHD] Question about session
How do I retrieve a list of active sessions using Apache SSHD?
Re: [Apache SSHD] Question about session
Posted by Guillaume Nodet <gn...@gmail.com>.
There's no firm plan but that could definitely be added I think.
I've added the method to access the sessions list, so that should be
in the coming 0.7 release.
For events, I've raised SSHD-172, but I don't have much time to work
on that in the near future, so if you're fancy working on that, we'd
definitely welcome a patch.
For users, sshd does not really aim at being standalone now, so user
management was left aside. I think most people just write their own
security authentication and user management. Inside Karaf, we're
delegating to JAAS so we have custom login modules for that. That
does not mean we can't provide anything, just that it has not really
been a need so far.
On Mon, Jun 4, 2012 at 11:14 PM, Wright, Omari <Om...@solers.com> wrote:
> Thanks, is there any plan in the future to add the concepts of user managers and event handlers as seen in Apache FtpServer?
>
> -----Original Message-----
> From: Guillaume Nodet [mailto:gnodet@gmail.com]
> Sent: Monday, June 04, 2012 4:59 PM
> To: users@mina.apache.org
> Subject: Re: [Apache SSHD] Question about session
>
> If you extend SshServer, you can do something like:
>
> List<AbstractSession> sessions = new ArrayList<AbstractSession>();
> for (IoSession ioSession : acceptor.getManagedSessions().values()) {
> AbstractSession session =
> AbstractSession.getSession(ioSession, true);
> if (session != null) {
> sessions.add(session);
> }
> }
>
> You can also customize the SessionFactory with your own derived class and use it
> sshd.setSessionFactory(xxx)
> which should allow you to customize sessions at creation time, but does not really solve the original problem.
>
> If you raise a JIRA issue, we can easily add a getActiveSessions() which would do the first snippet of code.
>
> On Mon, Jun 4, 2012 at 9:38 PM, Wright, Omari <Om...@solers.com> wrote:
>> How do I retrieve a list of active sessions using Apache SSHD?
>
>
>
> --
> ------------------------
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> FuseSource, Integration everywhere
> http://fusesource.com
--
------------------------
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
FuseSource, Integration everywhere
http://fusesource.com
RE: [Apache SSHD] Question about session
Posted by "Wright, Omari" <Om...@solers.com>.
Thanks, is there any plan in the future to add the concepts of user managers and event handlers as seen in Apache FtpServer?
-----Original Message-----
From: Guillaume Nodet [mailto:gnodet@gmail.com]
Sent: Monday, June 04, 2012 4:59 PM
To: users@mina.apache.org
Subject: Re: [Apache SSHD] Question about session
If you extend SshServer, you can do something like:
List<AbstractSession> sessions = new ArrayList<AbstractSession>();
for (IoSession ioSession : acceptor.getManagedSessions().values()) {
AbstractSession session =
AbstractSession.getSession(ioSession, true);
if (session != null) {
sessions.add(session);
}
}
You can also customize the SessionFactory with your own derived class and use it
sshd.setSessionFactory(xxx)
which should allow you to customize sessions at creation time, but does not really solve the original problem.
If you raise a JIRA issue, we can easily add a getActiveSessions() which would do the first snippet of code.
On Mon, Jun 4, 2012 at 9:38 PM, Wright, Omari <Om...@solers.com> wrote:
> How do I retrieve a list of active sessions using Apache SSHD?
--
------------------------
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
FuseSource, Integration everywhere
http://fusesource.com
Re: [Apache SSHD] Question about session
Posted by Guillaume Nodet <gn...@gmail.com>.
If you extend SshServer, you can do something like:
List<AbstractSession> sessions = new ArrayList<AbstractSession>();
for (IoSession ioSession : acceptor.getManagedSessions().values()) {
AbstractSession session =
AbstractSession.getSession(ioSession, true);
if (session != null) {
sessions.add(session);
}
}
You can also customize the SessionFactory with your own derived class and use it
sshd.setSessionFactory(xxx)
which should allow you to customize sessions at creation time, but
does not really solve the original problem.
If you raise a JIRA issue, we can easily add a getActiveSessions()
which would do the first snippet of code.
On Mon, Jun 4, 2012 at 9:38 PM, Wright, Omari <Om...@solers.com> wrote:
> How do I retrieve a list of active sessions using Apache SSHD?
--
------------------------
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
FuseSource, Integration everywhere
http://fusesource.com