SSH.NET
SSH.NET copied to clipboard
Shell's IDisposable implementation must dispose input stream if we own it
We have a few CreateShell(...)
overloads on SshClient were we create the input stream that we pass to Shell.
When the Shell instance is disposed, we should dispose that input stream as well.
We should add CreateShell(...)
overloads were we add a (bool) leaveOpen argument.
@drieseng, do you (or anyone else) know why there exists both Shell
and ShellStream
which both create a shell but don't seem to use each other?
I have been wondering if as part of fixing issues with them both, we should have one (i.e. Shell
) which exposes lower level interaction, and the other (i.e. ShellStream
but possibly renamed) which wraps Shell
and exposes the higher level operations like Expect
. I imagine this exposing StreamReader
/StreamWriter
properties much like System.Diagnostics.Process
with its StandardOutput
/StandardError
/StandardInput
properties.
We do see a problem when use ShellStream
. If the server sends channel close message to client, there's no where to know that until next Write.