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

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,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com server aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc

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

Alternatively, you can configure it in your ansible inventory:

10.192.21.5 ansible_ssh_common_args='-oKexAlgorithms=+diffie-hellman-group1-sha1'

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