# ssh bastion

**URL:** <https://forum.ansible.com/t/ssh-bastion/17769>\
**Category:** Ansible Project\
**Created:** [March 17, 2015, 11:51pm UTC](https://forum.ansible.com/t/ssh-bastion/17769 "2015-03-17T23:51:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![michael.ibarra](https://avatars.discourse-cdn.com/v4/letter/m/e8c25b/32.png) [@michael.ibarra](https://forum.ansible.com/u/michael.ibarra)\
**Post date:** [March 17, 2015, 11:51pm UTC](https://forum.ansible.com/t/ssh-bastion/17769/1 "2015-03-17T23:51:48Z")

</div>

Hi all,

I’m trying to use ansible with hosts located inside a DMZ. All the remote hosts have PasswordAuthentication no, RSAAuthentication ye,s and PubkeyAuthentication yes. So, when I try to connect using my playbook I got: [http://pastebin.com/hg2HQNVc](http://pastebin.com/hg2HQNVc)

Also:

$cat ~/.ssh/config

ControlMaster auto  
ControlPath /tmp/ssh-mux-%h-%p-%r  
ControlPersist 4h  
ForwardAgent yes  
ServerAliveInterval 30  
ServerAliveCountMax 120

Host bastionhost  
HostName [example.com](http://example.com)  
User testuser  
Port 22  
IdentityFile /home/localuser/.ssh/id\_rsa

Host remotehost  
Hostname 192.168.1.20  
User testuser  
Port 22  
IdentityFile /home/localuser/.ssh/id\_rsa  
ProxyCommand ssh bastionhost -W %h:%p

$cat /etc/ansible/ansible.cfg

[defaults]  
hostfile = /etc/ansible/hosts  
library = /usr/share/ansible  
remote\_tmp = $HOME/.ansible/tmp  
pattern = \*  
forks = 5  
poll\_interval = 15  
sudo\_user = root  
transport = smart  
remote\_port = 22  
sudo\_exe = sudo  
timeout = 10  
ansible\_managed = Ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid} on {host}  
action\_plugins = /usr/share/ansible\_plugins/action\_plugins  
callback\_plugins = /usr/share/ansible\_plugins/callback\_plugins  
connection\_plugins = /usr/share/ansible\_plugins/connection\_plugins  
lookup\_plugins = /usr/share/ansible\_plugins/lookup\_plugins  
vars\_plugins = /usr/share/ansible\_plugins/vars\_plugins  
filter\_plugins = /usr/share/ansible\_plugins/filter\_plugins  
[paramiko\_connection]  
[ssh\_connection]  
[accelerate]  
accelerate\_port = 5099  
accelerate\_timeout = 30  
accelerate\_connect\_timeout = 5.0
