# add ssh-exec style support for password patterns?

**URL:** <https://forum.ansible.com/t/add-ssh-exec-style-support-for-password-patterns/12129>\
**Category:** Ansible Project\
**Created:** [December 9, 2012, 10:01am UTC](https://forum.ansible.com/t/add-ssh-exec-style-support-for-password-patterns/12129 "2012-12-09T10:01:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christopher\_Snapp](https://avatars.discourse-cdn.com/v4/letter/c/a8b319/32.png) [@Christopher\_Snapp](https://forum.ansible.com/u/Christopher_Snapp)\
**Post date:** [December 9, 2012, 10:01am UTC](https://forum.ansible.com/t/add-ssh-exec-style-support-for-password-patterns/12129/1 "2012-12-09T10:01:13Z")

</div>

I’m curious whether anyone would find value in a built-in mechanism for supporting password patterns.

Prompting for passwords for authentication or for consumption within modules would be extremely handy except for the fact that it requires the same password on each machine.

A solution is to allow for a pattern to be provided that enables the actual password to be derived through applying the pattern to the hostname.

I just recently got off my duff and pushed my ssh-exec project up to github so you can read my explanation and try the implementation of password patterns here:

[https://github.com/christopher-snapp/ssh-exec](https://github.com/christopher-snapp/ssh-exec)

ssh-exec is a light-weight (one bash script) project initially started to support concurrent bulk command executions (think stdin via here-doc list of commands) against machines that support ssh but were not (or might not be able to be) configured for sudo. To support those environments I needed to support escalating to root via `su` while also being able to inject passwords into commands (e.g. passwd, tripwire…etc). Having the same password on the machines should not (in my opinion) be a valid option.

I’m hopeful the same (or similar) functionality could be added to ansible which would enable ansible to reach further into my data center.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [December 9, 2012, 1:43pm UTC](https://forum.ansible.com/t/add-ssh-exec-style-support-for-password-patterns/12129/2 "2012-12-09T13:43:56Z")

</div>

In general, the selection of system passwords is something I believe  
needs to remain outside of Ansible.
