how to proxy to containers behind nat?

152 views
Skip to first unread message

pixel fairy

unread,
Dec 9, 2015, 5:23:53 AM12/9/15
to Ansible Project
ansible 1.9.4 from pip on os x.

make an lxc host with no other purpose. all the containers are behind nat, so cant directly ssh to them, but i can ssh to the physical host.

this works, ssh n.n.n.n -o "ProxyCommand ssh lxctest -W %h:%p"

and so does ssh n.n.n.n -F sshoptions, which looks like this,
Host *
 
User root
 
ProxyCommand ssh lxctest -W %h:%p


how do you get that into the inventory? i tried group_vars/containers

---
ansible_ssh_common_args
: -F sshoptions


and directly in the hosts file, but ssh keeps timing out. heres one example,

[containers]
myct ansible_ssh_host
=N.N.N.N ansible_ssh_extra_args="-o 'ProxyCommand ssh lxctest -W %h:%p'"

has anyone gotten this to work?

Matt Martz

unread,
Dec 9, 2015, 7:30:35 AM12/9/15
to ansible...@googlegroups.com
ansible_ssh_common_args was introduced for 2.0 and does not exist in 1.9.4.
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/6221da3a-2939-400f-b7fe-b9b0c7853ab8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Matt Martz
@sivel
sivel.net

Reply all
Reply to author
Forward
0 new messages