# Unable to negotiate with 10.192.1.5 port 22: no matching cipher found. Their offer: aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc

**URL:** <https://forum.ansible.com/t/unable-to-negotiate-with-10-192-1-5-port-22-no-matching-cipher-found-their-offer-aes128-cbc-3des-cbc-aes192-cbc-aes256-cbc/29949>\
**Category:** Ansible Project\
**Created:** [March 22, 2019, 2:08am UTC](https://forum.ansible.com/t/unable-to-negotiate-with-10-192-1-5-port-22-no-matching-cipher-found-their-offer-aes128-cbc-3des-cbc-aes192-cbc-aes256-cbc/29949 "2019-03-22T02:08:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hitesh\_Kumar](https://avatars.discourse-cdn.com/v4/letter/h/a6a055/32.png) [@Hitesh\_Kumar](https://forum.ansible.com/u/Hitesh_Kumar)\
**Post date:** [March 22, 2019, 2:08am UTC](https://forum.ansible.com/t/unable-to-negotiate-with-10-192-1-5-port-22-no-matching-cipher-found-their-offer-aes128-cbc-3des-cbc-aes192-cbc-aes256-cbc/29949/1 "2019-03-22T02:08:47Z")

</div>

I am trying to connect switches in my network using ansible play book, but not able to connect it to my network switches

When I am running a command:  
hiteshkumar@INPNBXXX:/mnt/c/Users/hitesh.kumar$ sudo ansible-playbook getarp.yml -u admin.kumar -k  
SSH password:

PLAY [Get ARP information] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
TASK [show arp] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*fatal: [10.128.11.2]: UNREACHABLE! =\> {“changed”: false, “msg”: “Failed to connect to the host via ssh: ssh: connect to host 10.128.11.2 port 22: Connection refused”, “unreachable”: true}  
fatal: [10.192.21.5]: UNREACHABLE! =\> {“changed”: false, “msg”: “Failed to connect to the host via ssh: ssh: connect to host 10.192.21.5 port 22: Connection refused”, “unreachable”: true}

Direct SSH from bash prompt  
root@INPNB0XXXX: ~~# ssh 10.128.7.2~~  
~~Unable to negotiate with 10.128.7.2 port 22: no matching cipher found. Their offer: aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc~~  
~~root@INPNB05272:~~ #

Logs at switch side  
300395: Mar 20 09:25:44.175 UTC: %SSH-3-NO\_MATCH: No matching cipher found: client [chacha20-poly1305@openssh.com](mailto:chacha20-poly1305@openssh.com),aes128-ctr,aes192-ctr,aes256-ctr,[aes128-gcm@openssh.com](mailto:aes128-gcm@openssh.com),[aes256-gcm@openssh.com](mailto:aes256-gcm@openssh.com) server aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc

---

<div class="post-metadata">

**Author:** ![Jonathan\_Lozada\_De\_L](https://avatars.discourse-cdn.com/v4/letter/j/eb8c5e/32.png) [@Jonathan\_Lozada\_De\_L](https://forum.ansible.com/u/Jonathan_Lozada_De_L)\
**Post date:** [March 22, 2019, 2:30am UTC](https://forum.ansible.com/t/unable-to-negotiate-with-10-192-1-5-port-22-no-matching-cipher-found-their-offer-aes128-cbc-3des-cbc-aes192-cbc-aes256-cbc/29949/2 "2019-03-22T02:30:02Z")

</div>

you probably need to do this on your ~/.ssh/config

Host 192.168.1.1 #the IP of the device  
KexAlgorithms +diffie-hellman-group1-sha1

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [March 22, 2019, 6:57am UTC](https://forum.ansible.com/t/unable-to-negotiate-with-10-192-1-5-port-22-no-matching-cipher-found-their-offer-aes128-cbc-3des-cbc-aes192-cbc-aes256-cbc/29949/3 "2019-03-22T06:57:57Z")

</div>

Alternatively, you can configure it in your ansible inventory:

10.192.21.5 ansible\_ssh\_common\_args='-oKexAlgorithms=+diffie-hellman-group1-sha1'

---

<div class="post-metadata">

**Author:** ![Hitesh\_Kumar](https://avatars.discourse-cdn.com/v4/letter/h/a6a055/32.png) [@Hitesh\_Kumar](https://forum.ansible.com/u/Hitesh_Kumar)\
**Post date:** [March 25, 2019, 5:17am UTC](https://forum.ansible.com/t/unable-to-negotiate-with-10-192-1-5-port-22-no-matching-cipher-found-their-offer-aes128-cbc-3des-cbc-aes192-cbc-aes256-cbc/29949/4 "2019-03-25T05:17:43Z")

</div>

Hello Jonathan & Dick Visser

After changing inventory file entries with

10.192.6.6 ansible\_ssh\_common\_args=‘-oKexAlgorithms=+diffie-hellman-group1-sha1’

and uncomment ciphers values in ./ssh/config file,

Things start working. Thanks a lot for your support.

Br-  
Hitesh
