# How do I stop ansible-playbook asking for ssh password??

**URL:** <https://forum.ansible.com/t/how-do-i-stop-ansible-playbook-asking-for-ssh-password/33942>\
**Category:** Ansible Project\
**Created:** [October 1, 2020, 12:57pm UTC](https://forum.ansible.com/t/how-do-i-stop-ansible-playbook-asking-for-ssh-password/33942 "2020-10-01T12:57:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stephen\_Eaton](https://avatars.discourse-cdn.com/v4/letter/s/e5b9ba/32.png) [@Stephen\_Eaton](https://forum.ansible.com/u/Stephen_Eaton)\
**Post date:** [October 1, 2020, 12:57pm UTC](https://forum.ansible.com/t/how-do-i-stop-ansible-playbook-asking-for-ssh-password/33942/1 "2020-10-01T12:57:58Z")

</div>

Hi All,

I’m trying to bootstrap some remote VMs (ubuntu1804) that are not physically managed by me and have only been given ssh accesses as root via ssh keys only i.e. no password. I can confirm this works, i.e. I can ssh in as root with no password from my cli

using ansible 2.10.1 on macOS under python 3.8

I want to bootstrap these machines to get them onto our CI/CD pipeline

I’m using the playbook I normally bootstrap however ansible-playbook keeps prompting for a password in this case.

`ansible-playbook bootstrap.yml -k -extra-vars="hosts=x.x.x.x remote_user=root" `

I have also tried passing my ssh private key using ‘–private-key’ parameter to no avail.

also added `ask_pass=False` to my local ansible.cfg to no avail

I’ve successfully used this on other vms in the past that I physically manage however I just use the root password and then my bootstrap playbook does does the rest.

local ansible.cfg

[defaults]  
roles\_path=roles  
ask\_pass=false

transport=ssh

my playbook bootstrap.yml is:

- name: Bootstrap remote server for CI  
hosts: ‘{{ hosts }}’  
remote\_user: ‘{{ user }}’  
gather\_facts: no

roles:

- role: bootstrap

Thanks

Stephen

---

<div class="post-metadata">

**Author:** ![Stephen\_Eaton](https://avatars.discourse-cdn.com/v4/letter/s/e5b9ba/32.png) [@Stephen\_Eaton](https://forum.ansible.com/u/Stephen_Eaton)\
**Post date:** [October 1, 2020, 1:11pm UTC](https://forum.ansible.com/t/how-do-i-stop-ansible-playbook-asking-for-ssh-password/33942/2 "2020-10-01T13:11:55Z")

</div>

Doh!!!

‘-k’ was the culprit

…ill just crawl back under my rock….
