Quantcast
Channel: sshnet Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1729

New Post: VB.net SSH client with VB.net

$
0
0
Hi bgengine,
You ask for something that is difficult. You are asking that the SSH Client somehow know that the server is done with a command, but you won't tell it how to recognize the output when it is done. Suppose a command takes a few seconds, or outputs some, waits, outputs more, etc.?

[IMHO] The only way you can consistently do this is with one of the following, or a combination:
  1. You tell the client what to look for in the return stream that signals the command is complete (this depends on the server quite a bit, as they all return something different-even based on the command(s) given), or
  2. You give it a timeout period. "After 10 seconds, I am assuming you have the output, and I can send more. If not, oh well!"
I don't use all kinds of ssh servers, so I can't give you advise. But if your server somehow 'echoes' back it's input, or you know the prompt it will return, that all helps. Also, another 'gotcha' is if you enter &nix-style commandS <-plural on the command line, separated by ;. Is that one command, or multiple? What about pipes and redirects? What about timed/cycle or 'tail' style commands that run until you cancel them? And what about rapid-fire/batch commands send as multiple lines?

You see, from the program's perspective, it can only recognize the end based on what you tell it it should recognize as the end of a command.

If you find a way to compensate/prepare for all of that, I would love to see it! :)

pat
:)

Viewing all articles
Browse latest Browse all 1729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>