Issues running commands in a separate shell
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- C#
- Sterne
- 4.4k
- Forks
- 993
- Ø Merge
- 9 T. 21 Std.
- Gemergte PRs (30 T.)
- 1
Beschreibung
Hello,
We are writing a C# app that needs to talk to a system running Dropbear SSH running on ARM.
We cannot use the SSH.Net RunCommand() API directly because the system requires a separate shell - due to security concerns.
Attempting to use RunCommand, the call just hangs and eventually times out.
So, we are now calling CreateShellStream() and then using ReadStream() and WriteStream() to send commands via the Shell.
This seems to work somewhat ok, but we have some concerns:
(1) Performance - after calling WriteStream(), we are calling stream.Expect()
to know when the command is complete so we can look at the results
This is noticeably slower than calling the same commands manually from a PuTTY session -
is there a better way to handle this?
(2) Command Result Processing - not clear if a command succeeds or not
after we read the output stream, we have the text from stdout,
but we have to manually parse it to see if we think the command succeeded or not
is there any way to get the command result as an integer (0 meaning success)?
thanks for any suggestions -dennis
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginnen Sie mit der Überprüfung der im Bericht genannten Einstiegspunkte RunCommand(), CreateShellStream(), ReadStream(), WriteStream() und Expect(). Ermitteln Sie, ob der Workflow mit separater Shell den Exit-Status von Befehlen bereitstellen und die gemeldete Verzögerung vermeiden kann; im Issue werden keine Dateien oder Tests genannt, daher müssen Umfang und Kriterien für den Abschluss geklärt werden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- csharp
- Bereich
- networking
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100