# new proxy feature?

**URL:** <https://forum.ansible.com/t/new-proxy-feature/12663>\
**Category:** Ansible Project\
**Tags:** ansible-project\
**Created:** [April 11, 2013, 4:00pm UTC](https://forum.ansible.com/t/new-proxy-feature/12663 "2013-04-11T16:00:30Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [April 11, 2013, 4:00pm UTC](https://forum.ansible.com/t/new-proxy-feature/12663/1 "2013-04-11T16:00:30Z")

</div>

That is the ‘environment’ keyword for setting, among other things http\_proxy and https\_proxy variables.

Not entirely sure why your double jump didn’t work, but single hosts do.

Is it possible to run ansible from that initial host?

---

<div class="post-metadata">

**Author:** ![Brian\_Coca1](https://avatars.discourse-cdn.com/v4/letter/b/278dde/32.png) [@Brian\_Coca1](https://forum.ansible.com/u/Brian_Coca1)\
**Post date:** [April 12, 2013, 12:03am UTC](https://forum.ansible.com/t/new-proxy-feature/12663/2 "2013-04-12T00:03:38Z")

</div>

I’ve had it working with no issues with up to 4 jumps.

Brian Coca

---

<div class="post-metadata">

**Author:** ![Makimoto\_Marakatti](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@Makimoto\_Marakatti](https://forum.ansible.com/u/Makimoto_Marakatti)\
**Post date:** [April 12, 2013, 9:02am UTC](https://forum.ansible.com/t/new-proxy-feature/12663/3 "2013-04-12T09:02:15Z")

</div>

I’d be more than interested to learn how you do that. Can you elaborate or give some pointers?

How we have configured ssh\_config is simple enough:

Host host1  
ProxyCommand ssh -q -W %h:%p jumpbox  
HostName host1  
Host host2  
ProxyCommand ssh -q -W %h:%p host1  
HostName host2

for direct ssh access it works. Ansible throws a tantrum for host2…

thanks!

---

<div class="post-metadata">

**Author:** ![Serge\_van\_Ginderacht](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@Serge\_van\_Ginderacht](https://forum.ansible.com/u/Serge_van_Ginderacht)\
**Post date:** [April 12, 2013, 10:03am UTC](https://forum.ansible.com/t/new-proxy-feature/12663/4 "2013-04-12T10:03:36Z")

</div>

i just tested it with some of my hosts (names rewritten):

Host intermediate  
proxyCommand ssh -q -W %h:%p jump

Host test  
proxyCommand ssh -q -W %h:%p intermediate

This works perfectly running ansible on the test host, with -c ssh of course.

You do use -c ssh ?

Serge

---

<div class="post-metadata">

**Author:** ![Makimoto\_Marakatti](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@Makimoto\_Marakatti](https://forum.ansible.com/u/Makimoto_Marakatti)\
**Post date:** [April 12, 2013, 10:24am UTC](https://forum.ansible.com/t/new-proxy-feature/12663/5 "2013-04-12T10:24:36Z")

</div>

Hi

Yes, I do use the ssh transport. See my example here:

Host box3  
ProxyCommand ssh -q -W %h:%p jumpbox  
HostName box3  
Host box1  
ProxyCommand ssh -q -W %h:%p box3  
HostName box1

Now ansible fails thus:

$ ansible box1 -m raw -a "echo ‘hello’ " -k -c ssh  
SSH password:  
box1 | FAILED | rc=5 \>\>

But ssh let’s me in with no issues:

$ ssh box1  
user@box3’s password:  
user@box1’s password:  
Last login: Fri Apr 12 11:11:02 2013 from [box3.domain.org](http://box3.domain.org)  
[user@box1 ~]$

The striking difference is that ansible only asks me for one passwd, where ssh asks me the password for box3 and the diligently asks me for the passwd for box1. (If you are wondering, I’ve got a ssh key on jumpbox)

I do not know if this relevant or not, but from where I’m sitting, if it’s using ssh to communicate, it should ask me for the second box’s passwd?

Thanks!

---

<div class="post-metadata">

**Author:** ![Makimoto\_Marakatti](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@Makimoto\_Marakatti](https://forum.ansible.com/u/Makimoto_Marakatti)\
**Post date:** [April 12, 2013, 11:42am UTC](https://forum.ansible.com/t/new-proxy-feature/12663/6 "2013-04-12T11:42:32Z")

</div>

Hi

You mean like having ansible installed on my control box AND on some jumpboxes??? Would that not be a configuration nightmare?  
Or am I misunderstanding here?

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [April 12, 2013, 1:56pm UTC](https://forum.ansible.com/t/new-proxy-feature/12663/7 "2013-04-12T13:56:03Z")

</div>

Jump hosts are entirely an SSH thing and do not require ansible installed on intermediate boxes.

---

<div class="post-metadata">

**Author:** ![Brian\_Coca1](https://avatars.discourse-cdn.com/v4/letter/b/278dde/32.png) [@Brian\_Coca1](https://forum.ansible.com/u/Brian_Coca1)\
**Post date:** [April 12, 2013, 6:38pm UTC](https://forum.ansible.com/t/new-proxy-feature/12663/8 "2013-04-12T18:38:16Z")

</div>

I just used keys and didn’t have to prompt for ssh password, not sure what happens if ansible is prompted for passwords more than once.

---

<div class="post-metadata">

**Author:** ![Serge\_van\_Ginderacht](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@Serge\_van\_Ginderacht](https://forum.ansible.com/u/Serge_van_Ginderacht)\
**Post date:** [April 12, 2013, 6:45pm UTC](https://forum.ansible.com/t/new-proxy-feature/12663/9 "2013-04-12T18:45:56Z")

</div>

​This might be the problem. I can't tell how ansible logic really responses  
to this.​

&nbsp;&nbsp;&nbsp;Serge

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [April 12, 2013, 8:09pm UTC](https://forum.ansible.com/t/new-proxy-feature/12663/10 "2013-04-12T20:09:26Z")

</div>

Keys are your friends!

---

<div class="post-metadata">

**Author:** ![Makimoto\_Marakatti](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@Makimoto\_Marakatti](https://forum.ansible.com/u/Makimoto_Marakatti)\
**Post date:** [April 12, 2013, 9:12pm UTC](https://forum.ansible.com/t/new-proxy-feature/12663/11 "2013-04-12T21:12:21Z")

</div>

Keys it is then. Still gotta “sell” ansible to my team, but we’ll get there 🙂  
Thanks to all
