I've been trying to setup Ansible to connect to some of our legacy production switches to take regular backups. I'm running into the issue that many have faced, for example here.
I've created a file ~/.ssh/config
containing
Host 123.123.123.123 KexAlgorithms +diffie-hellman-group14-sha1
This hasn't worked and still throws the error when I try to connect.
I've also added lines into /etc/ssh/ssh_config
with no joy.
When I try to connect manually using ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 123.123.123.123
I get an error message
Unable to negotiate with x.x.x.x port 22: no matching key exchange method found. Their offer: ssh-rsa
Does anyone have any suggestions? After trying to set the negotiation server wide and at an adhoc level I'm no closer to getting it working.
What actually finally got this working for me was adding the
– a_JW May 03 '22 at 09:16ansible_connection = local
in the ansible.conf file.