Not sure to completely understand your problem.
When the client execute a remote command, you need the server to be
able to understand and actually run the command.
If you're sending "ls -l" you need something on the server to handle that.
There is only a single CommandFactory implementation provided, which
is the one for scp support.
If you want to support "ls -l", you need to implement your own
CommandFactory, which could either launch a process to run "ls -l"
(and that would only work on unix) or implement it yourself the way
you want.
Not sure if that's only an example, or if you actually want to run "ls
-l" though ...

On Thu, Jun 3, 2010 at 11:06, Doron Fediuck <do...@redhat.com> wrote:
> Hi,
> I tried setting up a server using your 5-minute guide.
> This server has-
> sshd.setCommandFactory(new ScpCommandFactory());
>
> The problem is, that my client code runs:
> channel = session.createExecChannel("ls -l");
>
> And this is not supported by ScpCommandFactory (took me a lot of
> debug to get the error message "Unknown command, does not begin with 'scp'"
> this has to be better logged!).
>
> When my client code tuns on standard Linux sshd it works perfectly,
> how can I support it with mina sshd server code without changing
> the client side?
>
> Thanks,
> Doron
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Reply via email to