# Hi folks need ansible proxycomand to run on network devices through bastion host without ~/.ssh/config method.Need to be command in hostfile itself.

**URL:** <https://forum.ansible.com/t/hi-folks-need-ansible-proxycomand-to-run-on-network-devices-through-bastion-host-without-ssh-config-method-need-to-be-command-in-hostfile-itself/33454>\
**Category:** Ansible Project\
**Created:** [July 21, 2020, 3:50pm UTC](https://forum.ansible.com/t/hi-folks-need-ansible-proxycomand-to-run-on-network-devices-through-bastion-host-without-ssh-config-method-need-to-be-command-in-hostfile-itself/33454 "2020-07-21T15:50:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Venu\_Devannagari1](https://avatars.discourse-cdn.com/v4/letter/v/439d5e/32.png) [@Venu\_Devannagari1](https://forum.ansible.com/u/Venu_Devannagari1)\
**Post date:** [July 21, 2020, 3:50pm UTC](https://forum.ansible.com/t/hi-folks-need-ansible-proxycomand-to-run-on-network-devices-through-bastion-host-without-ssh-config-method-need-to-be-command-in-hostfile-itself/33454/1 "2020-07-21T15:50:26Z")

</div>

## host file:-

[asa]

x.x.x.x

[asa:vars]

ansible\_user=xxxx

ansible\_password=xxxxx

ansible\_auth\_pass=xxxxx

ansible\_python\_interpreter=/usr/bin/python2.7

ansible\_network\_os=asa

ansible\_connection=network\_cli

ansible\_ssh\_common\_args=‘-o ProxyCommand=“sshpass -p ‘passwordbastion’ ssh -W %h:%p -q username@bastionhost”’

tried like above but not able to run on asa through proxy command.

able to do ssh manually to the device.

Can some one help here to get the correct proxy command for network devices.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Venu\_Devannagari1](https://avatars.discourse-cdn.com/v4/letter/v/439d5e/32.png) [@Venu\_Devannagari1](https://forum.ansible.com/u/Venu_Devannagari1)\
**Post date:** [July 27, 2020, 7:02am UTC](https://forum.ansible.com/t/hi-folks-need-ansible-proxycomand-to-run-on-network-devices-through-bastion-host-without-ssh-config-method-need-to-be-command-in-hostfile-itself/33454/2 "2020-07-27T07:02:50Z")

</div>

Hi Guys can some one help here to execute network playbook through bastion host
