Linux to Windows powershell remoting (Kali 2019.4)

It is possible to do powershell remoting from Linux to Windows but I didn’t find the process especially obvious. After spelunking through a bunch of GitHub discussions I did make it all work. This is a short summary of the solutions that mattered to me. I assume this will become out-of-date quickly but if you’re lucky it might save you some time.

The scenario is where you might run the following on Windows, having ensured the target host is trusted.

PS > Enter-PSSession -Credential DOMAIN\username

When working, both Windows and Linux will prompt for the corresponding password.

Problem: No powershell on Kali


apt install powershell

Run as pwsh

Problem: Error message about no WSMan client library

This parameter set requires WSMan, and no supported WSMan client library was found.
WSMan is either not installed or unavailable for this system.

Solution: Chances are the installed by powershell is requesting libssl-1.0.0 and libcrypto-1.0.0 specifically but only 1.0.2 is installed for each. Verify this:

# ldd /opt/microsoft/powershell/6/
... => not found => not found

Then add symlinks. Yes this is dodgy but who’s getting precious about the sanctity of their Kali installation?

# cd /usr/lib/x86_64-linux-gnu
# ln -s
# ln -s


Problem: Error message about unspecified GSS failure

Enter-PSSession : Connecting to remote server failed with the
following error message : acquiring creds with username only failed Unspecified
GSS failure.  Minor code may provide more information SPNEGO cannot find mechanisms
to negotiate For more information, see the about_Remote_Troubleshooting Help topic. 


apt install gss-ntlmssp


Problem: Error message about access denied connecting with NTLM


Solution: Make sure to use -Authentication Negotiate even if this isn’t necessary when remoting from a Windows client.