Title: New-PSSession from Windows to Linux fails due to ssh banner · Issue #15759 · PowerShell/PowerShell · GitHub
Open Graph Title: New-PSSession from Windows to Linux fails due to ssh banner · Issue #15759 · PowerShell/PowerShell
X Title: New-PSSession from Windows to Linux fails due to ssh banner · Issue #15759 · PowerShell/PowerShell
Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerShell 5.1 and PowerShell. Steps to reprodu...
Open Graph Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh...
X Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/15759
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"New-PSSession from Windows to Linux fails due to ssh banner","articleBody":"### Prerequisites\n\n- [X] Write a descriptive title.\n- [X] Make sure you are able to repro it on the [latest released version](https://github.com/PowerShell/PowerShell/releases)\n- [X] Search the existing issues.\n- [X] Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\n- [X] Refer to [Differences between Windows PowerShell 5.1 and PowerShell](https://docs.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell).\n\n### Steps to reproduce\n\nSet up Windows 10 and Linux host for SSH.\r\nCreate a New-PSSession from Windows to Linux using SSH transport.\r\n`$Session = New-PSSession -HostName $ComputerName -UserName $SSHUsername -SSHTransport`\r\n\r\nPrior to KB5003173 for 20H2, the error could be negated with error handling. After that patch, the error is terminating regardless of how it is handled.\n\n### Expected behavior\n\n```console\nNew session should be created.\n```\n\n\n### Actual behavior\n\n```console\nThe SSH banner is evaluated to stderr and the connection fails.\n```\n\n\n### Error details\n\n```console\n> get-error\r\n\r\nException :\r\n Type : System.Management.Automation.Remoting.PSRemotingTransportException\r\n ErrorCode : 2100\r\n ErrorRecord :\r\n Exception :\r\n Type : System.Management.Automation.ParentContainsErrorRecordException\r\n Message : The background process reported an error with the following message: The SSH client session has\r\nended with error message: \"SSH Banner Test\".\r\n HResult : -2146233087\r\n CategoryInfo : ResourceUnavailable: (:) [], ParentContainsErrorRecordException\r\n FullyQualifiedErrorId : System.Management.Automation.Remoting.PSRemotingDataStructureException\r\n Message : The background process reported an error with the following message: The SSH client session has\r\nended with error message: \"SSH Banner Test\".\r\n HResult : -2146233087\r\nTargetObject : System.Management.Automation.RemoteRunspace\r\nCategoryInfo : OpenError: (System.Management.A…tion.RemoteRunspace:RemoteRunspace) [New-PSSession],\r\nPSRemotingTransportException\r\nFullyQualifiedErrorId : 2100,PSSessionOpenFailed\r\nErrorDetails : [Linux_TestHost] The background process reported an error with the following message: The SSH\r\nclient session has ended with error message: \"SSH Banner Test\".\r\nInvocationInfo :\r\n MyCommand : New-PSSession\r\n ScriptLineNumber : 755\r\n OffsetInLine : 36\r\n HistoryId : 3\r\n ScriptName : C:\\Users\\username\\Desktop\\SSH_test.ps1\r\n Line : $Session = New-PSSession -HostName $ComputerName -UserName $SSHUsername -SSHTransport\r\n-ErrorAction Stop\r\n\r\n PositionMessage : At C:\\Users\\username\\Desktop\\SSH_test.ps1\r\n + … $Session = New-PSSession -HostName $ComputerName -UserName $SSHUsern …\r\n + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n PSScriptRoot : C:\\Users\\username\\Desktop\\\r\n PSCommandPath : C:\\Users\\username\\Desktop\\SSH_test.ps1\r\n InvocationName : New-PSSession\r\n CommandOrigin : Internal\r\nScriptStackTrace : at \u003cScriptBlock>\u003cProcess>, C:\\Users\\username\\Desktop\\SSH_test.ps1:\r\nline 755\r\n at \u003cScriptBlock>, \u003cNo file>: line 1\n```\n\n\n### Environment data\n\n```powershell\n> $psversiontable\r\n\r\nName Value\r\n---- -----\r\nPSVersion 7.1.3\r\nPSEdition Core\r\nGitCommitId 7.1.3\r\nOS Microsoft Windows 10.0.19042\r\nPlatform Win32NT\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}\r\nPSRemotingProtocolVersion 2.3\r\nSerializationVersion 1.1.0.1\r\nWSManStackVersion 3.0\n```\n\n\n### Visuals\n\n_No response_","author":{"url":"https://github.com/thukk","@type":"Person","name":"thukk"},"datePublished":"2021-07-12T16:09:13Z","url":"https://github.com/PowerShell/PowerShell/issues/15759"}
| 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:1fb19128-9989-48fe-a9c1-921d80f6b9b1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DA4E:11FCD:2A5D57:3B66D8:6AFDB1F1 |
| html-safe-nonce | 4bb3a8aa0d939a2136e8ffca74a4945a0e7679c0c022dfaf4ddcfa7b3243492e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQTRFOjExRkNEOjJBNUQ1NzozQjY2RDg6NkFGREIxRjEiLCJ2aXNpdG9yX2lkIjoiNzYyOTg5NjM4NTM2OTU4NDExMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 5569f0f9808c83563f3f74ce646ca758a8a92b8a1eb7fc9efc54d7d1109b16c8 |
| hovercard-subject-tag | issue:942217715 |
| 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/15759/issue_layout |
| twitter:image | https://opengraph.githubassets.com/25d8b5de18aaf1d9d5f7f749de587ebc069f26db2b18d7e8f1db746e21186e4e/PowerShell/PowerShell/issues/15759 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/25d8b5de18aaf1d9d5f7f749de587ebc069f26db2b18d7e8f1db746e21186e4e/PowerShell/PowerShell/issues/15759 |
| og:image:alt | Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | thukk |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3c532f4d069d6fbe9b1837450343d1b9e0619a7d5c4ba0b3b64fd8e0bae67c7e |
| 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 | 5396ad00d1c6d19097aee7fc4d00a2eb03432c8f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width