# How to pass ssh args in ansible

**URL:** <https://forum.ansible.com/t/how-to-pass-ssh-args-in-ansible/35482>\
**Category:** Ansible Project\
**Created:** [July 9, 2021, 1:11am UTC](https://forum.ansible.com/t/how-to-pass-ssh-args-in-ansible/35482 "2021-07-09T01:11:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vincent\_Nambatac](https://avatars.discourse-cdn.com/v4/letter/v/d07c76/32.png) [@Vincent\_Nambatac](https://forum.ansible.com/u/Vincent_Nambatac)\
**Post date:** [July 9, 2021, 1:11am UTC](https://forum.ansible.com/t/how-to-pass-ssh-args-in-ansible/35482/1 "2021-07-09T01:11:07Z")

</div>

Hi Guys , I want to pass ang ssh arguments since I cannot directly use ssh@IP, I want to add this arguments;

ssh -o KexAlgorithms=diffie-hellman-group14-sha1 -o HostKeyAlgorithms=+ssh-dss -caes128-cbc@IP

How can i configure this to ansible. thanks in advance.

---

<div class="post-metadata">

**Author:** ![Richard\_Megginson](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/richard_megginson/32/4540_2.png) [@Richard\_Megginson](https://forum.ansible.com/u/Richard_Megginson)\
**Post date:** [July 9, 2021, 2:27am UTC](https://forum.ansible.com/t/how-to-pass-ssh-args-in-ansible/35482/2 "2021-07-09T02:27:13Z")

</div>

Use ansible\_ssh\_common\_args in your inventory or wherever you set your vars, or use the --ssh-common-args cli flag
