Hello,
What is the best way to get full results of an SshCommand synchronously? i.e. I just want to block until it's done.
Is it just:
Some other questions:
David
What is the best way to get full results of an SshCommand synchronously? i.e. I just want to block until it's done.
Is it just:
var cmd = client.CreateCommand("mycmd"); cmd.Execute(); String result = cmd.Result();
-
Does
SshCommand.Execute()
take care of blocking until the remote command has finished and all data has been received over the network? -
Is
SshCommand.ExitStatus
the traditional process exit code? -
It looks like
SshCommand.Result
andSshCommand.Error
represent STDOUT and STDERR respectively. Is this correct? -
Can
SshCommand.Execute()
accept some sort of timeout value? -
What is the purpose of the
SshCommand.Execute(string)
overload? How would/should I use it? -
At what point in the process is the SSH command channel destroyed? (even if the overall connection is still alive.)
-
What is the correct pattern to use if I want to execute multiple commands without needing to set up a full new client connection every time?
David