# ssh: no matching host key type found

**URL:** <https://forum.ansible.com/t/ssh-no-matching-host-key-type-found/38090>\
**Category:** Ansible Project\
**Created:** [June 12, 2023, 6:05pm UTC](https://forum.ansible.com/t/ssh-no-matching-host-key-type-found/38090 "2023-06-12T18:05:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Azadeh\_Amirhosseini](https://avatars.discourse-cdn.com/v4/letter/a/46a35a/32.png) [@Azadeh\_Amirhosseini](https://forum.ansible.com/u/Azadeh_Amirhosseini)\
**Post date:** [June 12, 2023, 6:05pm UTC](https://forum.ansible.com/t/ssh-no-matching-host-key-type-found/38090/1 "2023-06-12T18:05:13Z")

</div>

Hi All,  
i am using Redhat 9.0 and :  
$ ssh -V  
OpenSSH\_8.7p1, OpenSSL 3.0.1 14 Dec 2021  
after i run ssh command on an ip address, that i can connect to it by putty, i get the below error message:

Unable to negotiate with port 22: no matching host key type found. Their offer: ssh-dss,ssh-rsa

any recommendation please?

---

<div class="post-metadata">

**Author:** ![Andrew\_Latham](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@Andrew\_Latham](https://forum.ansible.com/u/Andrew_Latham)\
**Post date:** [June 12, 2023, 8:55pm UTC](https://forum.ansible.com/t/ssh-no-matching-host-key-type-found/38090/2 "2023-06-12T20:55:23Z")

</div>

While this is not an Ansible question you can allow other types via SSH args like the following example for legacy hardware.

ssh -o KexAlgorithms=+diffie-hellman-group1-sha1 -o HostKeyAlgorithms=+ssh-dss -c aes256-cbc
