tirrellcotton wrote:
e.g. ps auxwww | grep cat
Can you also ensure the Connection is still up if the ReadToEnd() is hanging?
client.RunCommand("pwd")
=> $HOME
client.RunCommand("cd /tmp")
client.RunCommand("pwd")
=> $HOME
client.RunCommand("cd /tmp && pwd")
=> /tmp
If you want the same environment for all command, you have to use a ShellStream.
Some commands are still freezing on the errreader.ReadToEnd() . Also command response in inconsistent. I can run the exact same command twice, first time it works, second time no response.Can you ensure on the server the command exits?cat /etc/*-release
e.g. ps auxwww | grep cat
Can you also ensure the Connection is still up if the ReadToEnd() is hanging?
Another issue is If I change the current directory it doesn't remember it between commands. Here is how I'm creating a connection:RunCommand() uses the ssh command feature. Means each command is started in it's own new "shell".
client.RunCommand("pwd")
=> $HOME
client.RunCommand("cd /tmp")
client.RunCommand("pwd")
=> $HOME
client.RunCommand("cd /tmp && pwd")
=> /tmp
If you want the same environment for all command, you have to use a ShellStream.