When executing a command with shellstream.Write("hostname"),
I then use shellstream.ReadLine(Timespan.FromSeconds(5)) which gives me:
hostname
<shows hostname>
but it lacks the last line. This also with other prompts...
root@hostname: /home/hostname
What am I missing here? I tried using shellstream.flush before reading... but that didn't do the job... I can do many readline actions afterwards, yet I don't get that last line in return, so it isn't a time issue.
With some machines with SSH I don't have this issue, but with a few the following happens:
If I compare the output with MobaXTerm, in MobaXterm after executing a command I always get a new line with for instance:
When executing a command with shellstream.Write("hostname"), I then use shellstream.ReadLine(Timespan.FromSeconds(5)) which gives me:
but it lacks the last line. This also with other prompts...
root@hostname: /home/hostname
What am I missing here? I tried using shellstream.flush before reading... but that didn't do the job... I can do many readline actions afterwards, yet I don't get that last line in return, so it isn't a time issue.