Fix for SSH remoting when banner is enabled on SSHD endpoint#16205
Fix for SSH remoting when banner is enabled on SSHD endpoint#16205daxian-dbw merged 5 commits intoPowerShell:masterfrom PaulHigin:fix-ssh-banner
Conversation
|
Open PRs should not be assigned to milestone, so they are not assigned to the wrong milestone after they are merged. For backport consideration, use a |
|
@daxian-dbw Is there anything preventing this from being merged into vNext branch? |
|
Open PRs should not be assigned to milestone, so they are not assigned to the wrong milestone after they are merged. For backport consideration, use a |
|
@PaulHigin You forgot to move this to "Ready for review", so I didn't know this is ready to be merged. |
|
Oh, there are conflicts. Can you please rebase your changes to resolve the conflicts? |
|
I checked the |
Ilya marked your PR as draft when he left his comment: I marked it "ready for review" 2 days ago when saw your comment: "Ready for review" button is at the right corner of the CI part of a draft PR:
It has been this way for previous changes to this list, for example, PSNativeCommandErrorActionPreferenceFeatureName, PSAnsiRenderingFileInfo, and PSLoadAssemblyFromNativeCode. It adds a little convenience when adding a new item at the end of the list. |
|
Just because it has been that way before doesn't mean I have to agree to it :) |
|
Of course :) Just wanted to clarify why I made that minor change. |
|
🎉 Handy links: |



PR Summary
This is a fix for Issue #15759.
PR Context
The SSH transport currently terminates a connection attempt if SSH writes any error to stdErr stream, essentially making any SSH error a terminating error. However, data stdErr is unreliable for this since it can contain warnings, the endpoint banner text, and probably other non-error related information, and this can cause an SSH connection to fail unnecessarily.
Fix is to just remove this code and only write the stdErr data to the terminal. A user can terminate an SSH connection in one of two ways;
Ctrl+Cin an interactive session-ConnectingTimeoutparameter in theNew-PSSession,Invoke-Command,Enter-PSSessioncmdletsPR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.(which runs in a different PS Host).