Yes exec channel serves my purpose. Thanks for the prompt reply!
BTW, I find this library really useful. Just if it had better augmented
javadocs, it would be much easier to get started.

Thanks

On Fri, Jun 12, 2015 at 12:13 PM, Guillaume Nodet <[email protected]> wrote:

> If you're using an exec channel, the channel should close when the command
> is finished and the all the output has been sent.
> If you're using a shell channel, there's no notion of command from the
> client point of view, it's just a bidirectional stream of characters, so I
> don't think there's an easy way to do so.
>
> Guillaume Nodet
>
> 2015-06-12 8:36 GMT+02:00 Satya Deep Maheshwari <[email protected]>:
>
> > Hi
> >
> > I am using ClientChannel to invoke commands on a remote machine via ssh.
> I
> > am sending remote commands by writing on the NoCloseInputStream
> associated
> > with this channel and the output of the command is getting written on the
> > associated NoCloseOutputStream.
> >
> > Is there some way I can determine that the command that I invoked has
> > completed and its output is available on the associated output stream?
> >
> > Thanks
> >
>

Reply via email to