Repository navigation
Closed
Labels
Resolution-DuplicateThe issue is a duplicate.The issue is a duplicate.WG-RemotingPSRP issues with any transport layerPSRP issues with any transport layer
Milestone
Description
I have installed OpenSSH and PowerShell 6.0.0.11 on my Windows 2012 system and PowerShell 6.0.0.11 on my Centos server but SSH works fine to the windows server so I know that is working and I am seeing the authorizations in my sshd.log but I get the following error any time I connect using Enter-PSsession
Enter-PSSession : The background process reported an error with the following
message: "The named pipe target process has ended.".
At line:1 char:1
+ Enter-PSSession -HostName 172.17.17.227 -UserName administrator
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [Enter-PSSession], PSRe
motingTransportException
+ FullyQualifiedErrorId : System.Management.Automation.Remoting.PSRemoting
DataStructureException,Microsoft.PowerShell.Commands.EnterPSSessionCommand
I do have the subsystem for PowerShell defined in SSHD as follows
Subsystem powershell C:/Program Files/PowerShell/6.0.0.11/powershell.exe -sshs -NoLogo -NoProfile
I did run the Install-PowerShellRemoting.ps1 from an admin level powershell 6 shell
Steps to reproduce
any attempt to use Enter-PSsession
Expected behavior
I should recieve a PS On my windows system
Actual behavior
Session Terminates with the following error
Enter-PSSession : The background process reported an error with the following
message: "The named pipe target process has ended.".
At line:1 char:1
+ Enter-PSSession -HostName 172.17.17.227 -UserName administrator
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [Enter-PSSession], PSRe
motingTransportException
+ FullyQualifiedErrorId : System.Management.Automation.Remoting.PSRemoting
DataStructureException,Microsoft.PowerShell.Commands.EnterPSSessionCommand
Environment data
Name Value
---- -----
PSVersion 6.0.0-alpha
PSEdition Core
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 3.0.0.0
GitCommitId v6.0.0-alpha.11
CLRVersion
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Metadata
Metadata
Assignees
Labels
Resolution-DuplicateThe issue is a duplicate.The issue is a duplicate.WG-RemotingPSRP issues with any transport layerPSRP issues with any transport layer
Activity
MaximoTrinidad commentedon Oct 23, 2016
This is a known and could be duplicate issue: #2473
Just prove that powershell-v6.0.0-alpha.11 still can't connect Linux to a Windows OS.
:)
robertforbes68 commentedon Oct 24, 2016
The error there is not being able to establish an SSH, as you see I am actually establishing an SSH and then powershell is dying out. Different issues IMO
MaximoTrinidad commentedon Oct 24, 2016
Agreed! That's why I said "could be duplicate issue". Still I've seen different error messages with SSH. And, in my case I was trying to connect from Ubuntu. The end result still is "Linux can't connect to Windows PowerShell using Open-SSH" .
I'm think out loud... I wonder if is some more on the Windows side (some missing settings) than Linux. I got it almost to the point of connecting but still failed.
:)
PaulHigin commentedon Oct 25, 2016
Always check the error record for exception and inner exceptions as they can many times provide more detailed information of the problem.
$err = $error[0]
$err.Exception
$err.Exception.InnerException
If Linux -> Windows SSH remoting broke recently it may be related to this issue (#2531), where a recent change in Win32-OpenSSH breaks Windows as a target for SSH remoting. But it still works as a client for Windows -> Linux remoting. I'll try to submit a PR this week that fixes the problem. The workaround is to not install the latest release of Win32-OpenSSH.
PaulHigin commentedon Oct 25, 2016
To expand on my comment some, PowerShell remoting uses SSH as a secure transport and any errors that SSH reports are wrapped in a transport/remoting exception. So you need to look for the contained inner exception to get the original SSH error message.
I have been running PS remoting Linux (Ubuntu 14) -> Windows successfully for weeks now as long as I can make an SSH connection to the target Windows machine. The only exception is the recent issue I describe above when I installed the latest version of Win32-OpenSSH.
robertforbes68 commentedon Oct 25, 2016
Thanks Paul, I'll rollback to a previous Open-SSH version, I am also
running the Win64 build of OpenSSH. I have no issues directly SSHing to the
windows box the issue is solely with remoting.
On Tue, Oct 25, 2016 at 11:45 AM, Paul Higinbotham <notifications@github.com
robertforbes68 commentedon Oct 25, 2016
Could be. I'll try ubuntu when I get off this plane :)
On Monday, October 24, 2016, Maximo Trinidad notifications@github.com
wrote:
robertforbes68 commentedon Oct 25, 2016
One quick question could you send me a copy of your sshd.config from the
OpenSSH-Win32 directory, I've seen several different ways to format the
subsystem lines and I am wondering if that is what is breaking mine. I have
tried both Win32 and Win64 and both 010 and 020 builds but no joy on
powershell remoting over SSH from Linux to Windows :(
Robert
On Tue, Oct 25, 2016 at 11:45 AM, Paul Higinbotham <notifications@github.com
robertforbes68 commentedon Oct 25, 2016
Ahhh I saw a video of some MS guys showing Linux connecting to Windows in
just this fashion.
On Sun, Oct 23, 2016 at 4:49 PM, Maximo Trinidad notifications@github.com
wrote:
joeyaiello commentedon Oct 25, 2016
Closing as a dupe of #2473
rob-scheepens commentedon Apr 28, 2017
Has anyone got his working yet? Setting DEBUG3 LogLevel seems to show the named pipe is disconnected (109), accompanied by an invalid handle error (6):
I'd really like remoting to work properly from Linux to Windows. ;)