You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is failing
Neither direct ssh connection or PowerShell ssh session work. This is the case for both "localhost" case and for connecting from a Linux Debian machine.
Expected output
Direct connection "ssh -v -l wojtek" should open a fully functional cmd shell.
PowerShell ssh session "$session = New-PSSession -HostName -UserName wojtek" should open a remote PowerShell session.
Actual output
In case of the direct connect I get the cmd prompt, but I can only do limited things. I can browse directories and execute built-in command like "type", but I cannot execute other console apps like "docker" or "vim" - they don't fail but the also produce no output.
In case of opening a PS session over SSH, it fails, both locally and remotely, with the following error
New-PSSession : [169.254.97.228] The background process reported an error with the following message: The SSH client session
has ended with error message: subsystem request failed on channel 0.
At line:1 char:12
+ $session = New-PSSession -HostName 169.254.97.228 -UserName "kozaczyn ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotingTranspor
tException
+ FullyQualifiedErrorId : 2100,PSSessionOpenFailed
I set the LogLevel to DEBUG3, but I don't see events corresponding to the above issues in the ssh server log files, so I don't know how to diagnose them (?).
The answer to your question is yes – the Debian machine can talk to the Windows machine.
I spent more time looking at the issue and I know what is going on. There are two other processes running in Windows 10 called “SSH Server Broker” and “SSH Server Proxy”. They compete for port 22 with OpenSSH services and it is “SSH Server Proxy” that handles native ssh connection (ssh -v <IP address> -l <user name>). Issue #318 (#318) explains what is going on. As soon as I stopped “SSH Server Broker” and “SSH Server Proxy” I could connect to the Windows machine via native ssh and the cmd shell seems to work fine.
The other issue was that I misinterpreted instructions for how to modify the sshd_config file @ https://github.com/PowerShell/PowerShell/tree/master/demos/SSHRemoting#setup-on-windows-machine and I put single quotes around the path to PowerShell 6 executable in the subsystem section (Subsystem powershell 'C:\Program Files\PowerShell\6.0.0.17\'powershell.exe -sshs -NoLogo -NoProfile). Once I set the LogLevel to DEBUG3 I could see that sshd was parsing the path wrong.
The instructions for how to use the OpenSSH with Windows and PowerShell should be updated to account for the two problems I have encountered.
Wojtek
From: Sebastian N. [mailto:notifications@github.com]
Sent: Wednesday, March 29, 2017 12:35 AM
To: PowerShell/Win32-OpenSSH <Win32-OpenSSH@noreply.github.com>
Cc: Wojtek Kozaczynski <wojtekkozaczynski@outlook.com>; Author <author@noreply.github.com>
Subject: Re: [PowerShell/Win32-OpenSSH] Cannot establish fully functional SSH or PowerShell SSH session connections (#610)
The IP you listed is an APIPA address. Are you sure the Debian machine is able to talk to the Windows machine?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#610 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AR4Iau5nt9VIX0-HoT5c1QHYVMHAZFx8ks5rqgm0gaJpZM4Msgo8>.
I stopped following the issue, so I don’t know if it has been fixed. It was not fixed when I was looking at it. May be worth contacting the Win32-OpenSSH team again.
Wojtek
From: 刘雨培 [mailto:notifications@github.com]
Sent: Tuesday, January 9, 2018 1:11 AM
To: PowerShell/Win32-OpenSSH <Win32-OpenSSH@noreply.github.com>
Cc: Wojtek Kozaczynski <wojtekkozaczynski@outlook.com>; Author <author@noreply.github.com>
Subject: Re: [PowerShell/Win32-OpenSSH] Cannot establish fully functional SSH or PowerShell SSH session connections (#610)
I meet this problem, too. Any fix?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#610 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AR4IaqBiS0jdVWUYP0yCxhgoKaDSfR35ks5tIy05gaJpZM4Msgo8>.
I'm running into this coming from ubuntu going to server 2012 set up as a domain controller. I am able to ssh directly and get a standard (not powershell) shell for my user id but it fails from within pwsh with Enter-PSSession. I've tried the Username both with and without the domain
Scott (@treii28) it looks like what you detailed is not related to the original issue on this thread. Can you create a new issue and add further details for us to take a look?
Activity
megamorf commentedon Mar 29, 2017
The IP you listed is an APIPA address. Are you sure the Debian machine is able to talk to the Windows machine?
WojtekKozaczynski commentedon Mar 30, 2017
manojampalam commentedon Mar 30, 2017
Thanks Wojtek. I updated https://github.com/PowerShell/Win32-OpenSSH/wiki/Install-Win32-OpenSSH with a pointer to deal with this conflict on Windows 10.
LYP951018 commentedon Jan 9, 2018
I meet this problem, too. Any fix?
WojtekKozaczynski commentedon Jan 10, 2018
treii28 commentedon Jan 22, 2018
I'm running into this coming from ubuntu going to server 2012 set up as a domain controller. I am able to ssh directly and get a standard (not powershell) shell for my user id but it fails from within pwsh with Enter-PSSession. I've tried the Username both with and without the domain
manojampalam commentedon Jan 26, 2018
Scott (@treii28) it looks like what you detailed is not related to the original issue on this thread. Can you create a new issue and add further details for us to take a look?
manojampalam commentedon Jan 26, 2018
Closing this, since the original issue is understood and work around provided.
MoisesDRamirez commentedon Jun 18, 2019
Hola como puedo solucionar este error al verificar mi ssh-agent
eval $(ssh-agent -s)
bash: ssh-agent: command not found
Estoy en windows 7