# SSH no matching key type found while running Ansible Job on RHEL/Centos 6 servers

**URL:** <https://forum.ansible.com/t/ssh-no-matching-key-type-found-while-running-ansible-job-on-rhel-centos-6-servers/37856>\
**Category:** AWX Project\
**Tags:** rhel, awx, ee\
**Created:** [April 5, 2023, 3:21pm UTC](https://forum.ansible.com/t/ssh-no-matching-key-type-found-while-running-ansible-job-on-rhel-centos-6-servers/37856 "2023-04-05T15:21:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kunal\_kalyanpur](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@kunal\_kalyanpur](https://forum.ansible.com/u/kunal_kalyanpur)\
**Post date:** [April 5, 2023, 3:21pm UTC](https://forum.ansible.com/t/ssh-no-matching-key-type-found-while-running-ansible-job-on-rhel-centos-6-servers/37856/1 "2023-04-05T15:21:36Z")

</div>

Hi All,  
While running any Ansible job on AWX Tower, I get the following error **“Failed to connect to host via SSH. Unable to negotiate with . No matching host key type found. Their offer: ssh-rsa, ssh-dss”, unreachable": true**

This is happening only for RHEL 6.x & CentOS 6.x hosts. The same playbook works just fine for RHEL7 & RHEL 8 hosts. I searched and couldn’t find an ansible.cfg file on the awx-web or awx-ee container

I am running AWX version 21.14 deployed using k3s cluster  
version of ansible running on awx-ee container is: Ansible core 2.14

Is there an environmental variable that can be set in AWX Job settings or is there any other way to ensure Host key checking is ignored completely for EL6 systems?

Looking forward to your update and leads on this. I am stuck and cannot optimally execute playbooks owing to this issue.

Rgds,  
Kunal

> **(attachments)**
>
> ![Screenshot_1.png](https://us1.discourse-cdn.com/ansible/original/2X/7/7d68f12f6e4d610b71b011d6792a670a6028a7c0.png)

---

<div class="post-metadata">

**Author:** ![mjksohonet](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/mjksohonet/32/1217_2.png) [@mjksohonet](https://forum.ansible.com/u/mjksohonet)\
**Post date:** [April 5, 2023, 3:41pm UTC](https://forum.ansible.com/t/ssh-no-matching-key-type-found-while-running-ansible-job-on-rhel-centos-6-servers/37856/2 "2023-04-05T15:41:28Z")

</div>

The ssh-rsa algorithm was deprecated in OpenSSH some time ago as it is considered to be insecure.  
We have had a similar issue with Debian 8 hosts.  
We got around the issue by adding the following to the local ssh config  
_Host \*_  
_PubkeyAcceptedKeyTypes +ssh-rsa_  
Not really recommended but it works!  
Not sure how this could be implemented in AWX.

If you can update the RHEL/CentOS 6 hosts, that would be the way to go.

---

<div class="post-metadata">

**Author:** ![kunal\_kalyanpur](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@kunal\_kalyanpur](https://forum.ansible.com/u/kunal_kalyanpur)\
**Post date:** [April 6, 2023, 4:00am UTC](https://forum.ansible.com/t/ssh-no-matching-key-type-found-while-running-ansible-job-on-rhel-centos-6-servers/37856/3 "2023-04-06T04:00:39Z")

</div>

Hi,  
Can someone kindly provide leads on this. Has anyone experienced this behavior earlier??

Rgds,  
Kunal
