Replies: 3 comments
-
So, scratch false-positives of the 2nd connection and 2nd command. I narrowed this down to the actual command: |
Beta Was this translation helpful? Give feedback.
-
Test with Plink, since plink uses the same API on the server side as ssh command(executes directly the binary and returns the stdout with no concept of a session), if the results are the same I would say it could be because it requires a full shell like, in that case you will need to use a ShellStream, that would be the same way Putty works since it creates a Console Shel sessionl for you to enter the commands. That is why when SSHCommand() is used and one does cd to a folder and then pwd you see it does not changes because it does not interact with an actual console session but uses the same sshexec api as Plink, a ShellStream should work like Putty on that regard where you would write and read from the stream created. An example of use of a stream https://stackoverflow.com/questions/34204693/getting-full-command-output-from-shellstream-of-c-sharp-ssh-net
|
Beta Was this translation helpful? Give feedback.
-
Turns out that I won't be allowed to do as much R&D as this library requires :( |
Beta Was this translation helpful? Give feedback.
-
With the help of password prompt event suggested by @darkoperator, I was able to connect to FreeBSD and run a bunch of commands. However, once I make a 2nd connection to the same host and call 1
RunCommand()
, the 2ndRunCommand()
hangs.I cannot reproduce this behavior in any Linux distro or version (RHEL, openSUSE, SLES, Debian, Fedora), so it is probably FreeBSD-specific.
Beta Was this translation helpful? Give feedback.
All reactions