Powershell Script started with SshCommand keeps running even after connectivity loss
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
I wanted to start a specific .ps1 file with SSH, so I tried running the script with both SSH.NET and SSH on the Terminal. After testing a little bit I noticed, that after a connectivity loss the Script started with the Terminal drops itself regardless of the progress, on the other Hand with SSH.NET the .ps1 file keeps running even if the connection is dropped.
for SSH.NET I used this Code to start the .ps1-File:
sshc.Connect();
using (var cmd = sshc.CreateCommand("powershell.exe -command C:\\Test.ps1\""))
{
cmd.Execute();
}
sshc.Disconnect();
So I want to know why does SSH.NET keeps the script alive and is this a wanted feature
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 dem gezeigten SSH.NET-Ablauf unter Verwendung von Connect(), CreateCommand(), Execute() und Disconnect(), und reproduzieren Sie das Verhalten, indem Sie während C:\Test.ps1 die Verbindung unterbrechen. Vergleichen Sie es mit dem Verhalten des Terminals und stellen Sie fest, ob die Befehlsausführung nach dem Verlust der SSH-Verbindung erwartungsgemäß fortgesetzt wird; dokumentieren oder testen Sie das resultierende Verhalten.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- csharp, powershell
- Bereich
- networking
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100