Jonathan Warren
Jonathan Warren

Reputation: 1

Issue with ansible and ssh ciphers not being able to connect

when running a playbook to a network device that uses ssh ciphers I am unable to connect.

I created a ansible-playbook as a POC. I want to be able to pull and push config. I'm using NAPLAM to do this.

I can sucessfully run the playbook to push a config, and it works, but the next time it stops working. I have narrow it down to this piece of configuation. When I remove this config snippet. I am able to succesfully connect to the juniper device. [edit groups BASE-SYSTEM system services ssh]

Also. I can ssh directly from the ansible node bash shell and able to log in with the above removed and when it is present with no issue.

ansible_ssh_common_args=-o [email protected],[email protected] -o MACs=hmac-sha2-256,[email protected],hmac-sha2-512,[email protected] -o KexAlgorithms=ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521

I have tried to many variation of this . I have add this line above to the inventory file, and tried adding as an adhoc command, nothing is working.

Any ideas what could be the issue.

Upvotes: 0

Views: 339

Answers (1)

Jonathan Warren
Jonathan Warren

Reputation: 1

I found this issue, Paramiko doesn't support aes128-gcm or aes256-gcm

https://github.com/paramiko/paramiko/pull/2157/files#diff-6f8d19089abc567a553e0b19a239f1f757b4f5a5a862d530df5f061fdb40f46f

I was able to update the python script , or the other option was to install the ansible-pylibssh and that took care of the problem

Upvotes: 0

Related Questions