Skip to content

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

Closed

Description

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

Activity

  1. megamorf commented on Mar 29, 2017

    @megamorf

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

  2. WojtekKozaczynski commented on Mar 30, 2017

    @WojtekKozaczynski
    Author
  3. manojampalam commented on Mar 30, 2017

    @manojampalam
    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.

  4. LYP951018 commented on Jan 9, 2018

    @LYP951018

    I meet this problem, too. Any fix?

  5. WojtekKozaczynski commented on Jan 10, 2018

    @WojtekKozaczynski
    Author
  6. treii28 commented on Jan 22, 2018

    @treii28

    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

  7. manojampalam commented on Jan 26, 2018

    @manojampalam
    Contributor

    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?

  8. manojampalam commented on Jan 26, 2018

    @manojampalam
    Contributor

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

  9. MoisesDRamirez commented on Jun 18, 2019

    @MoisesDRamirez

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions