"I am creating a new Thread for every user but If more than one user connect at 
the same time I just allow 1 user to enter the command. "

How do you do that ? Perhaps the load you are experiencing originates from a 
malformed exclusion mechanism

Also, try using the built-in "InteractiveProcessShellFactory.INSTANCE" instead 
of your code....

________________________________
From: Waseem Farooqui <waseem.farooqu...@gmail.com>
Sent: Monday, February 27, 2017 9:03 AM
To: dev@mina.apache.org
Subject: Apache MINA SSHd default ShellFactory Chocked the resources

Hi Devs,

I am using Apache MINA server for the ssh server implementation. I
basically want to intercept all the commands typed by the user and the
response sent by the server. I want to execute all the commands on
linux/windows shell. I am using

sshd.setShellFactory(new ProcessShellFactory(new String[]{"/bin/sh", "-i",
"-l"}));
I am creating a new Thread for every user but If more than one user connect
at the same time I just allow 1 user to enter the command. At the same time
all the cpu reached to 100% and all of these resources are taken by /bin/sh.

I am using core i5 cpu 2.50*4 with 8gb RAM and ubuntu 16.04.02 LTS 64bit.

What could be the reason? What should I do to achieve my goal ?

Regards:
Waseem ud din farooqui

Reply via email to