Powershell Script started with SshCommand keeps running even after connectivity loss
Nessuno ha ancora preso questa issue.
- Lingua principale
- C#
- Stelle
- 4.4k
- Fork
- 993
- Merge medio
- 9g 21h
- PR unite (30g)
- 1
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia con il flusso SSH.NET mostrato usando Connect(), CreateCommand(), Execute() e Disconnect(), quindi riproduci il comportamento interrompendo la connettività durante C:\Test.ps1. Confrontalo con il comportamento del terminale e determina se l’esecuzione del comando deve continuare dopo la perdita della connessione SSH; documenta o testa il comportamento risultante.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- csharp, powershell
- Ambito
- networking
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100