# prompt for "SSH pasword"

**URL:** <https://forum.ansible.com/t/prompt-for-ssh-pasword/21789>\
**Category:** Ansible Project\
**Created:** [June 16, 2016, 8:50am UTC](https://forum.ansible.com/t/prompt-for-ssh-pasword/21789 "2016-06-16T08:50:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Norris](https://avatars.discourse-cdn.com/v4/letter/j/e79b87/32.png) [@John\_Norris](https://forum.ansible.com/u/John_Norris)\
**Post date:** [June 16, 2016, 8:50am UTC](https://forum.ansible.com/t/prompt-for-ssh-pasword/21789/1 "2016-06-16T08:50:47Z")

</div>

Hi,  
very new to Ansible, working through books  
On my ansible server (a centos 7 machine) I have added root ssh key to my test machine. So I can [ssh root@mint-test](mailto:ssh@mint-test) and that works.  
When, as root, I run my playbook, I am prompted “SSH password:”. At this point I can enter anything - just enter or the wrong password or even the right password. And then ansible runs the playbook and all works as expected.  
In the ansible cfg file, ask\_pass is commented out. But even if I set it to False, still get problem.  
What am I doing wrong?  
Regards,  
John

---

<div class="post-metadata">

**Author:** ![Adam\_Morris](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@Adam\_Morris](https://forum.ansible.com/u/Adam_Morris)\
**Post date:** [June 17, 2016, 2:13am UTC](https://forum.ansible.com/t/prompt-for-ssh-pasword/21789/2 "2016-06-17T02:13:31Z")

</div>

What command are you using to run ansible?

I have a root ssh key shared out...  
ssh client  
works without a password, as does  
ansible-playbook site.yml -l client

If one works and the other doesn't I would be curious about what your command is...

---

<div class="post-metadata">

**Author:** ![John\_Norris](https://avatars.discourse-cdn.com/v4/letter/j/e79b87/32.png) [@John\_Norris](https://forum.ansible.com/u/John_Norris)\
**Post date:** [June 20, 2016, 5:20am UTC](https://forum.ansible.com/t/prompt-for-ssh-pasword/21789/3 "2016-06-20T05:20:35Z")

</div>

> Hi Adam,

I have realised my dumb mistake. I was blindly following from a book which used the -k option which is --ask-pass and that is exactly what I did. Running it without the -k then no password request. Interesting though that it ignored whatever I typed.  
But many thanks for the reply, great to know that people are willing to help on the forum and that it is active.  
Regards,  
john

---

<div class="post-metadata">

**Author:** ![Adam\_Morris](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@Adam\_Morris](https://forum.ansible.com/u/Adam_Morris)\
**Post date:** [June 20, 2016, 1:27pm UTC](https://forum.ansible.com/t/prompt-for-ssh-pasword/21789/4 "2016-06-20T13:27:02Z")

</div>

No Problem, that was why I asked what command you had been using… Yes this forum is very active.
