-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Needs-TriageThe issue is new and needs to be triaged by a work group.The issue is new and needs to be triaged by a work group.WG-RemotingPSRP issues with any transport layerPSRP issues with any transport layer
Description
This hang occurs when an SSH remoting endpoint is misconfigured. The SSH client used to establish the connection ends silently, without having established the subsystem connection. The PowerShell remoting layer gets no error and remains indefinitely in a pre-connection state. I have repro'd this only on Windows so far, but suspect the same problem exists on non-Windows platforms.
I found this while investigating PowerShell SSH test hang issue. I don't know if this is the same issue as with the automated tests, but should be fixed.
Steps to reproduce
# Misconfigure endpoint by providing invalid path in subsystem
# sshd_config file
Subsystem powershell E:\InvalidPath\publish\pwsh.exe -SSHS -NOLOGO -NOPROFILE
$session = New-PSSession -HostName localhostExpected behavior
Error returned because the endpoint is invalid.
Actual behavior
No error.
Hang.
Environment data
Name Value
---- -----
PSVersion 7.1.3
PSEdition Core
GitCommitId 7.1.3
OS Microsoft Windows 10.0.19042
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Metadata
Metadata
Assignees
Labels
Needs-TriageThe issue is new and needs to be triaged by a work group.The issue is new and needs to be triaged by a work group.WG-RemotingPSRP issues with any transport layerPSRP issues with any transport layer