Skip to content

PSRP over SSH from Linux to Windows fails after password #2473

Closed

Description

Steps to reproduce

Execute following line:

Enter-PSSession -HostName 10.0.0.26 -UserName Administrator

Expected behavior

To connect to Windows Server 2016 and give a PowerShell prompt,

Actual behavior

When trying to connect ti fails giving the following error:

PS /home/maxt> Enter-PSSession -HostName 10.0.0.26 -UserName Administrator
Enter-PSSession : The background process reported an error with the following
message: The SSH client session has ended with error message: ssh: connect to
host 10.0.0.26 port 22: Connection timed out.
At line:1 char:1

  • Enter-PSSession -HostName 10.0.0.26 -UserName Administrator
  • - CategoryInfo          : ResourceUnavailable: (:) [Enter-PSSession], PSRe 
      motingTransportException
    - FullyQualifiedErrorId : System.Management.Automation.Remoting.PSRemoting 
      DataStructureException,Microsoft.PowerShell.Commands.EnterPSSessionCommand
    
    

linuxtowindowserr

Environment data

Windows OS Name: Microsoft Windows 2016 GA Build 14393

Linux: Ubuntu 16.04.1 LTS Desktop

PS C:\Program Files\PowerShell\6.0.0.10> $PSVersionTable

Name Value


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

Activity

  1. MaximoTrinidad commented on Oct 13, 2016

    @MaximoTrinidad
    Author

    Almost there!

    1. Windows to Linux Ubuntu- Good
    2. Linux Ubuntu to Linux Fedora - Good
    3. Linux Fedora to Linux Ubuntu - Good
    4. Linux Ubuntu to Windows - Fail

    I'm hoping is a setting issue! But is looking good.
    :)

    allwayremoting

  2. PaulHigin commented on Oct 17, 2016

    @PaulHigin
    Contributor

    Maximo Trinidad (@MaximoTrinidad) As the error message says, the error is coming from SSH and it is unable to connect to your Windows machine. Try connecting directly with SSH (ssh Administrator@10.0.0.26) and you will likely get the same ssh client error. Have you tried pinging the Windows machine?

  3. added this to the milestone on Oct 25, 2016
  4. modified the milestones: , on Nov 21, 2016
  5. changed the title [-]Remoting Linux to Windows fail after password[/-] [+]PSRP over SSH from Linux to Windows fails after password[/+] on Jan 24, 2017
  6. PaulHigin commented on Mar 16, 2017

    @PaulHigin
    Contributor

    I am not able to repro this. I can do SSH remoting from Ubuntu machine to Windows machine by passing in the password. There were some earlier bugs where this didn't work due to set up errors and the error message was not clear. I believe these are fixed now and any error message coming from SSH client is returned.

  7. treii28 commented on Jan 22, 2018

    @treii28

    I'm getting this error now but I am able to ssh into my user account. I checked the InnerException as per your suggestion on close #2525 but it was empty.

    Oh wait, looking closer, mine is saying 'The SSH client session has ended with the error message: subsystem request failed on channel 0."

  8. PaulHigin commented on Jan 22, 2018

    @PaulHigin
    Contributor

    Scott (@treii28) Check the powershell subsystem line in your sshd_config file. The subsystem path/name is likely no longer valid. I have been experimenting with Enable-SSHRemoting prototype, that helps set up and verify a PowerShell SSH remoting endpoint, but I have not had time to work on it recently.

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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions