You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Revathy Kuberan <re...@gmail.com> on 2012/01/05 06:29:14 UTC

Apache mina 2.0.4 and sshd 0.6.0

Hi,

We are using Apache sshd 0.6.0 and Apache mina 2.0.4 for communicating from
ssh business client to our Application.

In our application we have a requirement to limit the maximum number of
connection that a client can establish to the server on per port basis:

Scenario is as follows:

1) Ssh server is started in the machine on the port say 5601.
2) A maximum connection limit is set for that particular port as "2".
3) Client Session1 is opened successfully
4) Client Session2 is opened successfully
5) Client Session3 fails to open since i have the limit of 2 connection.
This is as expected.
6) if i exit the ClientSession1 first - the client window is closed. but
still i could see that session is shown as established when i run netstat
command.
7)Now as a next step if i close ClientSession2 - the client window is
closed and now both the first sesison's and second
session's Establishment is disconnected properly.

Could some one please let us now why this behavior occurs? Ideally if the
clientsession1 exits, the session corresponding to it should be
disconnected.

Note: If I exit the clientsession2
 first(establishment disconnected immediately) and then the
clientsession1(establishment disconnected immediately) next then everything
happens smoothly as expected.

Regards,
Revathy

Re: Apache mina 2.0.4 and sshd 0.6.0

Posted by Kiran Ayyagari <ka...@apache.org>.
On Thu, Jan 5, 2012 at 10:59 AM, Revathy Kuberan
<re...@gmail.com> wrote:
> Hi,
>
> We are using Apache sshd 0.6.0 and Apache mina 2.0.4 for communicating from
> ssh business client to our Application.
>
> In our application we have a requirement to limit the maximum number of
> connection that a client can establish to the server on per port basis:
>
> Scenario is as follows:
>
> 1) Ssh server is started in the machine on the port say 5601.
> 2) A maximum connection limit is set for that particular port as "2".
> 3) Client Session1 is opened successfully
> 4) Client Session2 is opened successfully
> 5) Client Session3 fails to open since i have the limit of 2 connection.
> This is as expected.
> 6) if i exit the ClientSession1 first - the client window is closed. but
> still i could see that session is shown as established when i run netstat
> command.
is your conclusion here based on the port number and the state it is
in? if yes, then it is plain normal
see the Socket.setSoLinger() for more details.
> 7)Now as a next step if i close ClientSession2 - the client window is
> closed and now both the first sesison's and second
> session's Establishment is disconnected properly.
>
> Could some one please let us now why this behavior occurs? Ideally if the
> clientsession1 exits, the session corresponding to it should be
> disconnected.
>
> Note: If I exit the clientsession2
>  first(establishment disconnected immediately) and then the
> clientsession1(establishment disconnected immediately) next then everything
> happens smoothly as expected.
>
> Regards,
> Revathy



-- 
Kiran Ayyagari