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?