question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NTLM authentication over ssl does not work

See original GitHub issue

Hello, I am using powershell core 6.2.2, the remote powershell is the latest version on windows 10, not sure which one it is… I have configured winrm manually to accept remote connections including over ssl, and I have installed ntlm plugins for libgssapi for powershell core to be able to do ntlm auth. However when I try to login from linux (powershell core) to windows, it does not work… This is the actual session:

[webczat@wlap powershell]$ ./pwsh 
PowerShell 6.2.2
Copyright (c) Microsoft Corporation. All rights reserved.

https://aka.ms/pscore6-docs
Type 'help' to get help.
PS /home/webczat/powershell> $cred=get-credential

PowerShell credential request
Enter your credentials.
User: webczat
Password for user webczat: xxx

PS /home/webczat/powershell> $opt=new-pssessionoption -skipcacheck -skipcncheck
PS /home/webczat/powershell> new-pssession -computername 192.168.122.40 -auth Negotiate -credential $cred -usessl -sessionoption $opt
new-pssession : [192.168.122.40] Connecting to remote server 192.168.122.40 failed with the following error message : Authorization failed For more information, see the about_Remote_Troubleshooting Help topic.
At line:1 char:6
+ new-pssession -computername 192.168.122.40 -auth Negotiate -cred ...
+      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : OpenError: (System.Management.A\u2026tion.RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotingTransportException
+ FullyQualifiedErrorId : 2,PSSessionOpenFailed
PS /home/webczat/powershell> 

However:

  • It does work when using basic authentication when it is enabled on windows side.
  • It works when ntlm is used and ssl is disabled, like -usessl is left out in new-pssession.
  • It works in ssl and non ssl case when logging into localhost from the windows side, or when logging via pywinrm library remotely from linux.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
msftbot[bot]commented, Oct 4, 2019

This issue has been marked as answered and has not had any activity for 1 day. It has been closed for housekeeping purposes.

3reactions
mertcelencommented, Sep 4, 2019

Same issue here, winrm is perfectly capable to use ntlm over ssl, I seriously don’t get why we can’t use it even after disabling the verification at all.

Read more comments on GitHub >

github_iconTop Results From Across the Web

HttpClient using both SSL encryption and NTLM ...
My guess is that NTLM authentication fails due to SSL connections not being persistent. NTLM scheme requires multiple message exchanges and ...
Read more >
Authentication failure from non-Windows NTLM or ...
This article provides a solution to several authentication failure issues in which NTLM and Kerberos servers can't authenticate Windows 7 ...
Read more >
Does SSL work with NTLM authentication?
Yes, you can use SSL with NTLM. Be sure though when you setup your search that you index a non ssl virtual of...
Read more >
Authentication issues using NTLM, SSL, and SharePoint
SSL is not overkill if you need to encrypt the content. Kerberos without SSL is secure enough for the authentication, but does not...
Read more >
NTML Authentication does not work when running LTM...
I am trying to set up an https F5 LTM VIP for one application that authenticates users using NTLM. However, when I used...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found