# Using Ansible from host through bastion to private IP

**URL:** <https://forum.ansible.com/t/using-ansible-from-host-through-bastion-to-private-ip/31396>\
**Category:** Ansible Developer\
**Tags:** awx\
**Created:** [September 30, 2019, 7:56pm UTC](https://forum.ansible.com/t/using-ansible-from-host-through-bastion-to-private-ip/31396 "2019-09-30T19:56:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Josh\_B](https://avatars.discourse-cdn.com/v4/letter/j/8797f3/32.png) [@Josh\_B](https://forum.ansible.com/u/Josh_B)\
**Post date:** [September 30, 2019, 7:56pm UTC](https://forum.ansible.com/t/using-ansible-from-host-through-bastion-to-private-ip/31396/1 "2019-09-30T19:56:31Z")

</div>

Hello everyone!  
I have been an ansible and AWX user for years and love it!!

I have a new project underway. I am running ansible from my mac. I need to connect to a private IP that is in a restricted VPC. I have a bastion host and can access this machine with no issues. The bastion can also run ansible commands on the private host.

Where I am seeing issues is when I use Ansible from the host — SSH to the bastion Then from the bastion hop to the private IP. Ansible seems to loose the credentials along the way. I have followed several posts with configuration ideas (including Ansible’s approach) and none seem to work.

I am able to proxy SSH through the bastion and hit the destination device from my local machine with no issues.

Any help would be appreciated.

Thanks!!!

Josh
