certificate: the specified credentials were rejected by the server

I can’t connect even after completing the winrm configuration.

NMAP(Linux → Windows)

[root@aeansibleapp01 ~]# /bin/nmap -PN 1.1.1.1 -p 5986 Starting Nmap 6.40 ( http://nmap.org ) at 2022-02-09 14:30 KST Nmap scan report for 1.1.1.1 Host is up (0.00077s latency). PORT STATE SERVICE 5986/tcp open wsmans Nmap done: 1 IP address (1 host up) scanned in 0.05 seconds

Windows Setting

PS C:\Users\Administrator> service winrm Status Name DisplayName ------ ---- ----------- Running winrm Windows Remote Management (WS-Manag… PS C:\Users\Administrator> netstat -aon | select-string -Pattern “5985|5986” TCP 0.0.0.0:5985 0.0.0.0:0 LISTENING 4 TCP 0.0.0.0:5986 0.0.0.0:0 LISTENING 4 TCP [::]:5985 [::]:0 LISTENING 4 TCP [::]:5986 [::]:0 LISTENING 4 PS C:\Users\Administrator> winrm get winrm/config/service Service RootSDDL = O:NSG:BAD:P(A;;GA;;;BA)(A;;GR;;;IU)S:P(AU;FA;GA;;;WD)(AU;SA;GXGW;;;WD) MaxConcurrentOperations = 4294967295 MaxConcurrentOperationsPerUser = 1500 EnumerationTimeoutms = 240000 MaxConnections = 300 MaxPacketRetrievalTimeSeconds = 120 AllowUnencrypted = true Auth Basic = true Kerberos = true Negotiate = true Certificate = true CredSSP = false CbtHardeningLevel = Relaxed DefaultPorts HTTP = 5985 HTTPS = 5986 IPv4Filter = * IPv6Filter = * EnableCompatibilityHttpListener = false EnableCompatibilityHttpsListener = false CertificateThumbprint AllowRemoteAccess = true

Steps to Reproduce
ansible httpwin -m win_ping -i inventory

Actual Results
1.1.1.1 | UNREACHABLE! => { “changed”: false, “msg”: “certificate: the specified credentials were rejected by the server”, “unreachable”: true }