+-------------------+ +-----------------+ (Socket)InputStream ---> | secsh transport | <===> | secsh channel | (Socket)OutputStream --> | (auth, pipe) | N | (buffer) | +-------------------+ +-----------------+ @ feeder thread | | - read InputStream | +-> InputStream - feed into channel +---> OutputStream buffers SIS <-- @ --> (parse, find chan) --> secsh chan: buffer <-- SSHInputStream SSHOutputStream --> secsh chan --> secsh transport --> SOS [no thread]