Default Launching /system/bin/sh from ssh server

Hi all,
I'm trying to embed an ssh server to the app I'm developing. Hopefully the server start correctly (it is implemented using the apache mina library).
The problem is that when I try to login using putty on my desktop computer, I get this error:
/system/bin/sh: No controlling tty: open /dev/tty: No such device or address
/system/bin/sh: can't find tty fd
/system/bin/sh: warning: won't have full job control
I've already tried with root permissions, but I get the same error.

What am I doing wrong ? Thanks for the help !