# bug: ssh\_extra\_args allows only one option

**URL:** <https://forum.ansible.com/t/bug-ssh-extra-args-allows-only-one-option/20889>\
**Category:** Ansible Project\
**Created:** [March 16, 2016, 2:47pm UTC](https://forum.ansible.com/t/bug-ssh-extra-args-allows-only-one-option/20889 "2016-03-16T14:47:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexk4work](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@alexk4work](https://forum.ansible.com/u/alexk4work)\
**Post date:** [March 16, 2016, 2:47pm UTC](https://forum.ansible.com/t/bug-ssh-extra-args-allows-only-one-option/20889/1 "2016-03-16T14:47:50Z")

</div>

Hi all,

I’m trying to pass a couple of command line keys thru ssh\_extra\_args and it seems to me that there’s a very annoying limitation: only one key can be passed because of apostrophs around the value of this parameter.  
This is the ssh command generated by ansible:

`  
\<172.17.24.7\> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 ‘-R 3128:proxy.srv1.lan:3128 -i /home/bamboo/.ssh/mykey’ -o ControlPath=/home/bamboo/.ansible/cp/ansible-ssh-%h-%p-%r 172.17.24.7 ‘LANG=C LC\_ALL=C LC\_MESSAGES=C /usr/bin/python’

16-Mar-2016 17:38:13 fatal: [srv-mon]: UNREACHABLE! =\> {“changed”: false, “msg”: “ERROR! SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh”, “unreachable”: true}  
`

Ansible hides for some reason the errors from ssh (a bug to me), so I ran this commans from shell:

`  
$ ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 ‘-R 3128:proxy.srv1.lan:3128 -i /home/bamboo/.ssh/mykey’ -o ControlPath=/home/bamboo/.ansible/cp/ansible-ssh-%h-%p-%r 172.17.24.7

Bad remote forwarding specification ’ 3128:proxy.srv1.lan:3128 -i /home/bamboo/.ssh/mykey’  
`

Now it’s clear, two keys in single apostrophs are treated as one.  
Can we eliminate this escaping at all?
