# Secure Authentication

**URL:** <https://forum.ansible.com/t/secure-authentication/19005>\
**Category:** Ansible Project\
**Created:** [August 12, 2015, 6:18pm UTC](https://forum.ansible.com/t/secure-authentication/19005 "2015-08-12T18:18:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rishikesh\_Pawar](https://avatars.discourse-cdn.com/v4/letter/r/f08c70/32.png) [@Rishikesh\_Pawar](https://forum.ansible.com/u/Rishikesh_Pawar)\
**Post date:** [August 12, 2015, 6:18pm UTC](https://forum.ansible.com/t/secure-authentication/19005/1 "2015-08-12T18:18:10Z")

</div>

Hi

In hosts file I have 10 servers, each having different password.  
How can I make secure authentication to all hosts without specifying password in plain text?

---

<div class="post-metadata">

**Author:** ![Marcus\_Franke](https://avatars.discourse-cdn.com/v4/letter/m/cdc98d/32.png) [@Marcus\_Franke](https://forum.ansible.com/u/Marcus_Franke)\
**Post date:** [August 12, 2015, 7:59pm UTC](https://forum.ansible.com/t/secure-authentication/19005/2 "2015-08-12T19:59:44Z")

</div>

Hi,

what about some kind of a bootstrap playbook that will create a deployment user with sudo rights and a ssh key access.

This way you will have to provide the password exact one time per server.

/mf

---

<div class="post-metadata">

**Author:** ![Joseph\_DJOMEDA](https://avatars.discourse-cdn.com/v4/letter/j/13edae/32.png) [@Joseph\_DJOMEDA](https://forum.ansible.com/u/Joseph_DJOMEDA)\
**Post date:** [August 12, 2015, 10:22pm UTC](https://forum.ansible.com/t/secure-authentication/19005/3 "2015-08-12T22:22:14Z")

</div>

Rishikesh Pawar ,

Based on what Marcus suggested here a way to start. Mine uses a pem file that you have some where. My approach is simple. I always create an ansible user to do the work on nodes. My user role creates the ansible user on nodes and adds a sudoer file from template.

I hope this works for you or at least help you start with your own solution

> **(attachments)**
>
> [main.yml](https://forum.ansible.com/uploads/short-url/zekZuEiV0BTZ45T7drISJsrOuvC.yml) (466 Bytes)  
> [sudoer.j2](https://forum.ansible.com/uploads/short-url/3g9nb0Y2yLziFDhLLYGCTy9EI4f.j2) (41 Bytes)  
> [ansible\_bootstraping.yml](https://forum.ansible.com/uploads/short-url/bWM5vCHve4F7I73vKPk6C54LeeM.yml) (328 Bytes)

---

<div class="post-metadata">

**Author:** ![Rishikesh\_Pawar](https://avatars.discourse-cdn.com/v4/letter/r/f08c70/32.png) [@Rishikesh\_Pawar](https://forum.ansible.com/u/Rishikesh_Pawar)\
**Post date:** [August 13, 2015, 5:25am UTC](https://forum.ansible.com/t/secure-authentication/19005/4 "2015-08-13T05:25:36Z")

</div>

Thanks Marcus franke
