# Arguments passed to OpenSSH too intrusive.

**URL:** <https://forum.ansible.com/t/arguments-passed-to-openssh-too-intrusive/12588>\
**Category:** Ansible Project\
**Tags:** ansible-project\
**Created:** [March 26, 2013, 10:40pm UTC](https://forum.ansible.com/t/arguments-passed-to-openssh-too-intrusive/12588 "2013-03-26T22:40:50Z")\
**Posts on this page:** 4\
**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:** [March 26, 2013, 10:40pm UTC](https://forum.ansible.com/t/arguments-passed-to-openssh-too-intrusive/12588/1 "2013-03-26T22:40:50Z")

</div>

First off,

JumpHosts work fine with -c ssh.

The only thing we pass along that overrides is the user, and I still  
maintain setting that is pretty vital to multi-user operation. Don't  
think about it as SSH, think about it as a systems management app that  
just happens to be using SSH as a transport.

If you want to control the user default on a per host basis without  
specifying it, set ansible\_ssh\_user=foo in your playbook and you get  
that.

If we were to add the new parameter, I think people would engage it --  
at least this is my fear-- and then ask why setting the user didn't  
work anymore.

---

<div class="post-metadata">

**Author:** ![jsull003](https://avatars.discourse-cdn.com/v4/letter/j/53a042/32.png) [@jsull003](https://forum.ansible.com/u/jsull003)\
**Post date:** [March 26, 2013, 11:17pm UTC](https://forum.ansible.com/t/arguments-passed-to-openssh-too-intrusive/12588/2 "2013-03-26T23:17:07Z")

</div>

> JumpHosts work fine with -c ssh.

To clarify, I am only speaking of the case where OpenSSH is the transport. If the user is using Paramiko or another transport I’m sure nothing I’m saying will apply.

I have got Ansible to work very nicely with my jump host, it was just a bit of a pain to figure out what was going wrong, and all I’m trying to do right now is figure out if there’s some way to make it slightly more intuitive to figure out.

> The only thing we pass along that overrides is the user

The SSH command that was formed seems to be:

> EXEC [‘ssh’, ‘-tt’, ‘-q’, ‘-o’, ‘ControlMaster=auto’, ‘-o’, ‘ControlPersist=60s’, ‘-o’, ‘ControlPath=/tmp/ansible-ssh-%h-%p-%r’, ‘-o’, ‘StrictHostKeyChecking=no’, **‘-o’, ‘Port=22’,** ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PasswordAuthentication=no’, **‘-o’, ‘User=john’,** ‘-o’, ‘ConnectTimeout=10’, ‘azura-wiki’, “/bin/sh -c ’ /usr/bin/python /root/.ansible/tmp/ansible-1364339138.68-44297655032104/ping; rm -rf /root/.ansible/tmp/ansible-1364339138.68-44297655032104/ \>/dev/null 2\>&1’”]

I mistakenly thought that there were more surprising options in there because I already knew that port was overridden from [the blog post that sent me down the correct path](http://www.arrfab.net/blog/?p=371) to fixing this in the first place. So I guess all I’m really concerned with are port and user. Sorry for my confusion!

> If you want to control the user default on a per host basis without  
> specifying it, set ansible\_ssh\_user=foo in your playbook and you get  
> that.

I have done this and it is working splendidly, but I was very surprised that despite not having any ansible\_ssh\_user option specified, Ansible was still passing a user to SSH. It didn’t seem very natural to me that Ansible would try to override what SSH thought the user would be without me telling it to do so. So perhaps instead of adding another option, do you think it would be reasonable to have Ansible not pass a user parameter to SSH is ansible\_ssh\_user isn’t specified (and a similar setup for the port)? The current user would still be used by default per SSH’s rules (as far as I know), and any configuration the admin has set up will still apply.

Thank you for your reply,  
John Sullivan

---

<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:** [March 26, 2013, 11:30pm UTC](https://forum.ansible.com/t/arguments-passed-to-openssh-too-intrusive/12588/3 "2013-03-26T23:30:15Z")

</div>

" do you think it would be reasonable to have Ansible not pass a user  
parameter to SSH is ansible\_ssh\_user isn't specified (and a similar  
setup for the port)?"

Well, right now, it passes -u \<your user\> (not root), so I don't think  
that would be too confusing.

I believe I would be ok with that.

---

<div class="post-metadata">

**Author:** ![jsull003](https://avatars.discourse-cdn.com/v4/letter/j/53a042/32.png) [@jsull003](https://forum.ansible.com/u/jsull003)\
**Post date:** [March 26, 2013, 11:34pm UTC](https://forum.ansible.com/t/arguments-passed-to-openssh-too-intrusive/12588/4 "2013-03-26T23:34:56Z")

</div>

Sounds great! I’ll code up a small patch for it.

Have a great afternon,  
John Sullivan
