Why Am I Getting "Failed to connect to the host via ssh: ssh_exchange_identification" While Connecting to Windows Host Using Ansible ?

Solution Verified - Updated -

Issue

I already configured WinRM following the steps in the documentation , but when I run my playbook against a Windows node I'm getting.

 "msg": "Failed to connect to the host via ssh: ssh_exchange_identification: Connection closed by remote host",
    "unreachable": true,
    "changed": false

Environment

Ansible Engine
Ansible Tower

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content