Powershell: Linux Arm64 - WSMan issues

Created on 6 Jan 2020  路  7Comments  路  Source: PowerShell/PowerShell

Steps to reproduce

Enter-PSSession $RemoteHost -Cred ""

Expected behavior

Session to Connect to host.
Works fine from my Windows Desktop.

Actual behavior

Enter-PSSession : This parameter set requires WSMan, and no supported WSMan client library was found. WSMan is either not installed or unavailable for this system.
At line:1 char:1
+ Enter-PSSession $RemoteHost -Cred ""
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : InvalidArgument: ($RemoteHost:String) [Enter-PSSession], PSRemotingTransportException
+ FullyQualifiedErrorId : CreateRemoteRunspaceFailed

Environment data

aarch64 GNU/Linux

PS /etc/powershell> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      6.2.3
PSEdition                      Core
GitCommitId                    6.2.3
OS                             Linux 4.4.132-1075-rockchip-ayufan-ga83beded8524 #1 SMP Thu Jul 26 08:22:22 UTC 2018
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0鈥
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
Issue-Question Resolution-Answered WG-Remoting

Most helpful comment

@evanlanester
I have been working on a module that contains a Enable-SSHRemoting cmdlet to help set up an endpoint on a system so that PowerShell SSH remoting can connect to it. It requires that SSH client and server (sshd) be installed on the machine and configured appropriately for SSH connections. Then it creates a subsystem entry in the sshd_config file that allows a remote PowerShell remote connection over SSH.

It is not published yet but I have created a Gist link for what I have so far. You are welcome to use it.

https://gist.github.com/PaulHigin/b12b552b12dc4e8c940efe4f402e5362

Gist
PSRemotingTools module. GitHub Gist: instantly share code, notes, and snippets.

All 7 comments

Noticed this issue: Powershell: Issue 5561

Found that the Arm64 packages in Latest Release: Powershell don't contain the libmi.so file that seems to reference the libssl and libcrypto libraries for the WS-Man to work. The Amd64 release does.
Is this by design or a feature missing in Arm64 releases currently?

WinRM based remoting is not supported on non-Windows platforms. You might consider using SSH based remoting now that Windows supports OpenSSH.

You can use WinRM to connect from Linux hosts to Windows hosts. There are many examples of people using Powershell on Linux to connect to Windows hosts. There does seem to be a lot of issues with it though.
I spun up a Ubuntu 18.04 (64bit) VM and Enter-PSSession $RemoteHost -Cred "" -Authentication Negotiate works fine after adding the proper required libraries.

@iSazonov Ssh is not installed and opened by default on the windowsserver system. If this system is remote. How to climb the first mountain. :)

I think we see a deadlock :-) MSFT would be happy to have full-featured WinRM on Unix-s but strategic conclusion was to do not invest in SOAP. Also it is important to keep security and backward compatibility that is another deadlock.

In the meantime, I set up OpenSSH on the Windows server and will use that as it worked in my testing.
I don't like the idea of having WinRM and SSH both open as my environment is split 30% Windows and 70% Linux/Unix, and this project is the first time I am having to do remote calls from Linux to Windows.
I might just migrate all of my Windows to OpenSSH way of working and turn off WinRM altogether in this case.
I have a lot of Powershell scripts to fix. Thanks all!

@evanlanester
I have been working on a module that contains a Enable-SSHRemoting cmdlet to help set up an endpoint on a system so that PowerShell SSH remoting can connect to it. It requires that SSH client and server (sshd) be installed on the machine and configured appropriately for SSH connections. Then it creates a subsystem entry in the sshd_config file that allows a remote PowerShell remote connection over SSH.

It is not published yet but I have created a Gist link for what I have so far. You are welcome to use it.

https://gist.github.com/PaulHigin/b12b552b12dc4e8c940efe4f402e5362

Gist
PSRemotingTools module. GitHub Gist: instantly share code, notes, and snippets.
Was this page helpful?
0 / 5 - 0 ratings