mina-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillaume Nodet <gno...@apache.org>
Subject Re: How to configure ChannelShell correctly? (Part 2)
Date Thu, 29 Jun 2017 09:29:05 GMT
Here is an example of this integration:


For the server side, you can look at:


The invertedIn stream is an OutputStream which you can use to write to the
remote input stream of the ssh channel.  What you write will be the input
on the server side.  It's created when the channel is opened.
If an in channel is set (using setIn) before the channel is opened, a
thread will be created which will read from that InputStream and write the
data to the invertedIn.

You also have the ability to use an async mode where you can use streams
using the IoInputStream and IoOutputStream interfaces.

2017-06-29 11:07 GMT+02:00 Nick Lee <lee1nick@yahoo.ca.invalid>:

> Hello,
> One thing I forgot to mention ....
> The terminal emulator needs an InputStream and an OutputStream.
> I use ChannelShell.getOut() to obtain the OutputStream.
> I use ChannelShell.getInvertedOut() to obtain the InputStream, because
> ChannelShell.getIn() initially returns null and I did not check again later.
> Is that the right way to do it? Should I call getIn() later to obtain an
> InputStream? What is "inverted out" for?
> Thanks,Nick

Guillaume Nodet

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message