Skip to content

Enter-PSHostProcess does not work within an SSH remoting session. #2453

Closed

Description

You should be able to use PowerShell IPC (Enter-PSHostProcess) from within an SSH remote session just as you now can from within a WinRM remote session.

Steps to reproduce

Enter-PSSession -HostName computerName -UserName userName
[computerName]: PS C:\> Get-PSHostProcessInfo

ProcessName           ProcessId AppDomainName
-----------           --------- -------------
powershell                17324 DefaultAppDomain
powershell                12260 DefaultAppDomain
powershell                22696 DefaultAppDomain
wsmprovhost               16644 DefaultAppDomain

[computerName]: PS C:\> Enter-PSHostProcess 22696
Specified method is not supported.
    + CategoryInfo          : InvalidOperation: (Microsoft.Power...tProcessCommand:EnterPSHostProcessCommand) [Enter-PSHostProcess], PSNotSupportedException
    + FullyQualifiedErrorId : EnterPSHostProcessCannotPushRunspace,Microsoft.PowerShell.Commands.EnterPSHostProcessCommand

Expected behavior

Connecting to a local process from within an SSH remote session should succeed.

Actual behavior

Not supported error.

Environment data

WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
CLRVersion
GitCommitId                    v6.0.0-alpha.10-52-g6a618a3ad8bce9fdf6ae8ef78747538696d0d9e5-dirty
PSEdition                      Core
SerializationVersion           1.1.0.1
BuildVersion                   3.0.0.0
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSVersion                      6.0.0-alpha

Activity

  1. added this to the milestone on Nov 4, 2016
  2. modified the milestones: , on Nov 21, 2016
  3. PaulHigin commented on Dec 7, 2016

    @PaulHigin
    ContributorAuthor

    Removing self assignment since I am not currently working on this.

  4. modified the milestones: , 6.0.0-beta1 on Mar 15, 2017
  5. modified the milestones: , on May 15, 2017
  6. tgeorgiev commented on Feb 20, 2020

    @tgeorgiev

    Experiencing the same issue with 6.2.3. As a result, VSCode extension cannot attach to remote process to debug. Is there a workaround for this?

  7. PaulHigin commented on Feb 20, 2020

    @PaulHigin
    ContributorAuthor

    Tony (@tgeorgiev) Thanks for reminding me ... this fell off of my radar. I believe this may require a straightforward fix, and I'll take a look at it today.

  8. PaulHigin commented on Feb 21, 2020

    @PaulHigin
    ContributorAuthor

    A PR has been submitted to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugIssue has been identified as a bug in the productResolution-FixedThe issue is fixed.WG-RemotingPSRP issues with any transport layer

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions