# synchronize via ssh proxy

**URL:** <https://forum.ansible.com/t/synchronize-via-ssh-proxy/17620>\
**Category:** Ansible Project\
**Created:** [February 25, 2015, 12:40pm UTC](https://forum.ansible.com/t/synchronize-via-ssh-proxy/17620 "2015-02-25T12:40:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vaclav\_Adamec](https://avatars.discourse-cdn.com/v4/letter/v/a6a055/32.png) [@Vaclav\_Adamec](https://forum.ansible.com/u/Vaclav_Adamec)\
**Post date:** [February 25, 2015, 12:40pm UTC](https://forum.ansible.com/t/synchronize-via-ssh-proxy/17620/1 "2015-02-25T12:40:16Z")

</div>

Hi,  
I made simple backup playbook which sort servers to groups based on facts, run logrotate, … issues is with synchronize as everything is running via bastion ssh system and this task try to run directly. Is there any way to add ssh proxy setup for this ? I can delegate last step to bastion system, but it’s quit clumsy

Vasek

---

<div class="post-metadata">

**Author:** ![Matt\_Hite](https://avatars.discourse-cdn.com/v4/letter/m/5fc32e/32.png) [@Matt\_Hite](https://forum.ansible.com/u/Matt_Hite)\
**Post date:** [February 25, 2015, 4:21pm UTC](https://forum.ansible.com/t/synchronize-via-ssh-proxy/17620/2 "2015-02-25T16:21:19Z")

</div>

Give this a read:

[http://alexbilbie.com/2014/07/using-ansible-with-a-bastion-host/](http://alexbilbie.com/2014/07/using-ansible-with-a-bastion-host/)

-M

---

<div class="post-metadata">

**Author:** ![Philip\_Schwartz](https://avatars.discourse-cdn.com/v4/letter/p/a3d4f5/32.png) [@Philip\_Schwartz](https://forum.ansible.com/u/Philip_Schwartz)\
**Post date:** [February 25, 2015, 4:35pm UTC](https://forum.ansible.com/t/synchronize-via-ssh-proxy/17620/3 "2015-02-25T16:35:13Z")

</div>

Vasek,

I have done exactly this. I have setup my .ssh/config to look for .bastion on a hostname for ssh’ing. I then use .bastion in my inventory. Only downfall to this is you need to have DNS resolvable. (I have used skydns with injecting hosts into etcd to take care of this when I don’t have external DNS for them)

-Ph

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [February 25, 2015, 5:23pm UTC](https://forum.ansible.com/t/synchronize-via-ssh-proxy/17620/4 "2015-02-25T17:23:47Z")

</div>

You could use etcd lookup to set ansible\_ssh\_host for each of them
