Hi everybody,

I got an assignment to use ssh to interface to some legacy-system. There
is only one specific command which gets on argument and then reads some
details from standard-input. On unix it would be typically invoked like
this "/bin/doSomething createObject < /tmp/object".

I think I should be able to accomplish the same thing via jsch and using
"exec". "shell" seems to be some overhead.

For now I can use ssh-public-key authentication to invoke some command
like "ls -al /tmp/" and read its output. Adding some arguments to the
command is not a big deal. ;-)

However, input-redirection just won't work. I suppose I got lost in all
the streams in directions (is channel.setInputStream() referring to sent
as OUTPUT by me which is to be used as INPUT on the other side?)?


For now, I would be very happy just to no wheter I can in fact
accomplish my task with an exec-channel? I might be totally mistaken
there....

An example regarding those streams would be even better. ;-)



-- 
CU,
   Patrick.


------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
JSch-users mailing list
JSch-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to