Title: Ctrl+C doesn't work as expected with SSH Remoting · Issue #2321 · PowerShell/PowerShell · GitHub
Open Graph Title: Ctrl+C doesn't work as expected with SSH Remoting · Issue #2321 · PowerShell/PowerShell
X Title: Ctrl+C doesn't work as expected with SSH Remoting · Issue #2321 · PowerShell/PowerShell
Description: In PowerShell Ctrl+C should stop a running command. But in an SSH interactive remote session Ctrl+C terminates the SSH process and closes the session. This behavior is the same for both Windows and Linux clients. This is happening becaus...
Open Graph Description: In PowerShell Ctrl+C should stop a running command. But in an SSH interactive remote session Ctrl+C terminates the SSH process and closes the session. This behavior is the same for both Windows and...
X Description: In PowerShell Ctrl+C should stop a running command. But in an SSH interactive remote session Ctrl+C terminates the SSH process and closes the session. This behavior is the same for both Windows and...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/2321
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Ctrl+C doesn't work as expected with SSH Remoting","articleBody":"In PowerShell Ctrl+C should stop a running command. But in an SSH interactive remote session Ctrl+C terminates the SSH process and closes the session. This behavior is the same for both Windows and Linux clients.\n\nThis is happening because both PowerShell and SSH processes are attached to the console and so they both get the SIGINT signal. PowerShell sends a PSRP stop signal over the channel as expected but the SSH process also handles the signal and terminates the process which closes the remote session.\n## Steps to reproduce\n\n``` powershell\nPS> Enter-PSSession -HostName \u003chostName> -UserName \u003cuserName>\n[\u003chostName>]: PS > 1..100 % { sleep 1; \"Output $_\" }\nOutput 1\nOutput 2\n# While script is running type Ctrl+C to stop it\n```\n## Expected behavior\n\nRunning command stops and remote session prompt is displayed.\n## Actual behavior\n\nSession is ended with error:\n\n``` powershell\nSystem.IO.IOException: Pipe is broken\n```\n\nAlso the exception is unhandled causing PowerShell process to crash.\n## Environment data\n\n``` powershell\nName Value\n---- -----\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}\nSerializationVersion 1.1.0.1\nPSRemotingProtocolVersion 2.3\nBuildVersion 3.0.0.0\nWSManStackVersion 3.0\nPSVersion 6.0.0-alpha\nCLRVersion\nGitCommitId v6.0.0-alpha.10-8-gdd2394b1e6088f6c82054f5cae5520e532010fd4-dirty\nPSEdition Core\n```\n","author":{"url":"https://github.com/PaulHigin","@type":"Person","name":"PaulHigin"},"datePublished":"2016-09-20T21:27:41Z","url":"https://github.com/PowerShell/PowerShell/issues/2321"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4074c914-7695-bed6-8465-3378b3168a48 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BD6C:11138E:1198BF:189D7C:6AFD4D7D |
| html-safe-nonce | 24e6541102b65dc31464fcafaaa7526e50459b3ef756e09cbf64fed6c60941f5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRDZDOjExMTM4RToxMTk4QkY6MTg5RDdDOjZBRkQ0RDdEIiwidmlzaXRvcl9pZCI6IjQ5NzkyMTM3NTkwODQ4NDIzNjUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | f954ac4e46f86368ce5e7168abb8a68b90d942938874c1f9f351adc3cfa52201 |
| hovercard-subject-tag | issue:178184870 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/2321/issue_layout |
| twitter:image | https://opengraph.githubassets.com/14c0eb9a4b995fd32dfa6b5926bd9049c8eed397ee13f3bb09160449cdad733b/PowerShell/PowerShell/issues/2321 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/14c0eb9a4b995fd32dfa6b5926bd9049c8eed397ee13f3bb09160449cdad733b/PowerShell/PowerShell/issues/2321 |
| og:image:alt | In PowerShell Ctrl+C should stop a running command. But in an SSH interactive remote session Ctrl+C terminates the SSH process and closes the session. This behavior is the same for both Windows and... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | PaulHigin |
| hostname | github.com |
| expected-hostname | github.com |
| None | 66653c2e55a6fff2930be1bdf07ee4f8aa137e3956d056c822563be6f878755e |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | b6f01f7cb9f35f8c09949773241a3d49dd04b340 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width