Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot establish fully functional SSH or PowerShell SSH session connections #610

Closed
WojtekKozaczynski opened this issue Mar 29, 2017 · 9 comments

Comments

@WojtekKozaczynski
Copy link

Please answer the following

"OpenSSH for Windows" version
0.0.10.0

OS details
Windows 10 Pro

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

Comments
I have installed the latest versions of SSH for Windows and PowerShell 6.0.0.17 following the guidelines @ https://github.com/PowerShell/PowerShell/tree/master/demos/SSHRemoting#setup-on-windows-machine and their references

I have enclosed the sshd_config file.
sshd_config.zip

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 (?).

Wojtek

@megamorf
Copy link

The IP you listed is an APIPA address. Are you sure the Debian machine is able to talk to the Windows machine?

@WojtekKozaczynski
Copy link
Author

WojtekKozaczynski commented Mar 30, 2017 via email

@manojampalam
Copy link
Contributor

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
Copy link

I meet this problem, too. Any fix?

@WojtekKozaczynski
Copy link
Author

WojtekKozaczynski commented Jan 10, 2018 via email

@treii28
Copy link

treii28 commented 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
Copy link
Contributor

@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
Copy link
Contributor

manojampalam commented Jan 26, 2018

Closing this, since the original issue is understood and work around provided.

@MoisesDRamirez
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants