-
-
Notifications
You must be signed in to change notification settings - Fork 932
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to cancel SshCommand? #1023
Comments
No, using RunCommand, the Execute method blocks until all data is returned from the command, so nothing can be sent to stop the command. You need to use CreateShellStream to kill a running process, which allows writing data while reading data. You can then send Ctrl^C (\x3) to the output stream and kill the process. |
This was referenced Mar 5, 2024
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is CancelAsync method but it seems to only cancel connection between client and server. Is there a way to stop the command from running? Similarly to CTRL+C while running in BASH shell.
The text was updated successfully, but these errors were encountered: