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

Enhancement request: Add ssh to images #374

Closed
felixfbecker opened this issue Feb 9, 2020 · 7 comments
Closed

Enhancement request: Add ssh to images #374

felixfbecker opened this issue Feb 9, 2020 · 7 comments

Comments

@felixfbecker
Copy link

felixfbecker commented Feb 9, 2020

Summary

For Ubuntu-based images, this just needs an apt-get install openssh-client.

Steps to reproduce

New-PSSession -HostName ... -UserName ... -KeyFilePath ...

Expected behavior

Should allow PS remoting over SSH

Actual behavior

Error:

Enter-PSSession: An error has occurred which PowerShell cannot handle. A remote session might have ended.

Digging into the InnerException reveals that it is because of missing ssh:

System.Management.Automation.CommandNotFoundException: The term 'ssh' is not recognized as the name of a cmdlet,
                              function, script file, or operable program.
                              Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
                                 at System.Management.Automation.CommandDiscovery.LookupCommandInfo(String commandName, CommandTypes commandTypes,
                              SearchResolutionOptions searchResolutionOptions, CommandOrigin commandOrigin, ExecutionContext context)
                                 at System.Management.Automation.CommandDiscovery.LookupCommandInfo(String commandName, CommandOrigin commandOrigin,
                              ExecutionContext context)
                                 at System.Management.Automation.CommandDiscovery.LookupCommandInfo(String commandName, CommandOrigin commandOrigin)
                                 at System.Management.Automation.Runspaces.SSHConnectionInfo.StartSSHProcess(StreamWriter& stdInWriterVar,
                              StreamReader& stdOutReaderVar, StreamReader& stdErrReaderVar)
                                 at System.Management.Automation.Remoting.Client.SSHClientSessionTransportManager.CreateAsync()
                                 at System.Management.Automation.Remoting.ClientRemoteSessionDSHandlerImpl.SendNegotiationAsync(RemoteSessionState
                              sessionState)
                                 at System.Management.Automation.Remoting.ClientRemoteSessionDSHandlerImpl.HandleStateChanged(Object sender,
                              RemoteSessionStateEventArgs arg)
                                 at System.Management.Automation.ExtensionMethods.SafeInvoke[T](EventHandler`1 eventHandler, Object sender, T
                              eventArgs)
                                 at System.Management.Automation.Remoting.ClientRemoteSessionDSHandlerStateMachine.RaiseStateMachineEvents()
                                 at System.Management.Automation.Remoting.ClientRemoteSessionDSHandlerStateMachine.ProcessEvents()

For Ubuntu-based images, this just needs an apt-get install openssh-client.

Environment data

Name                           Value
----                           -----
PSVersion                      7.0.0-rc.2
PSEdition                      Core
GitCommitId                    7.0.0-rc.2
OS                             Linux 4.19.76-linuxkit #1 SMP Thu Oct 17 19:31:58 UTC 2019
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
@TravisEz13
Copy link
Member

cc @RDIL Do you want to take this?

@TravisEz13 TravisEz13 changed the title New-PSSession cannot be used over SSH because SSH is not included Enhancement request: Add ssh to images Feb 10, 2020
@RDIL
Copy link
Collaborator

RDIL commented Feb 10, 2020

I can't this week, sorry!

@TravisEz13
Copy link
Member

@RDIL no problem

@TravisEz13 TravisEz13 removed their assignment May 17, 2020
@coreone
Copy link

coreone commented Jul 9, 2020

Is there any movement on this, potentially for all Linux-based images? SSH appears to be the only protocol we can use to connect from Linux -> Windows with PowerShell.

@TravisEz13
Copy link
Member

TravisEz13 commented Jul 9, 2020

Is there any movement on this, potentially for all Linux-based images? SSH appears to be the only protocol we can use to connect from Linux -> Windows with PowerShell.

@coreone These images are intended to be base images. Maintaining adding and maintaining SSH across all the images is a large amount of work. It's currently in the community work project, meaning it is not scheduled work.

cc @SteveL-MSFT

@kiazhi
Copy link
Contributor

kiazhi commented Jul 29, 2020

This work is mostly completed except for linux images on Arm32v7 architecture.

@TravisEz13
Copy link
Member

Opened #474 to track the remaining work and closing this.

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

No branches or pull requests

5 participants