# Connecting over ssh with a password from facts

**URL:** <https://forum.ansible.com/t/connecting-over-ssh-with-a-password-from-facts/13911>\
**Category:** Ansible Project\
**Created:** [November 14, 2013, 9:32pm UTC](https://forum.ansible.com/t/connecting-over-ssh-with-a-password-from-facts/13911 "2013-11-14T21:32:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Grzegorz\_Nosek](https://avatars.discourse-cdn.com/v4/letter/g/5daacb/32.png) [@Grzegorz\_Nosek](https://forum.ansible.com/u/Grzegorz_Nosek)\
**Post date:** [November 14, 2013, 9:32pm UTC](https://forum.ansible.com/t/connecting-over-ssh-with-a-password-from-facts/13911/1 "2013-11-14T21:32:08Z")

</div>

Hi,

Is it possible to connect over ssh using a password retrieved from facts?

The cloud provider I'm using doesn't (yet) allow creating new VMs with an SSH key already baked in (you can create templates but it isn't really worth it for one-off VMs).

After creating the VM I can get the root password but I'm not sure how to use it from inside Ansible.

I'd like to say, e.g.:

&nbsp;&nbsp;- add\_host: name=new\_vm ansible\_ssh\_host={{ new\_vm.ip }} ansible\_ssh\_password={{ new\_vm.password }}

or equivalent.

Any pointers?

Best regards,  
&nbsp;&nbsp;Grzegorz Nosek

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [November 14, 2013, 9:38pm UTC](https://forum.ansible.com/t/connecting-over-ssh-with-a-password-from-facts/13911/2 "2013-11-14T21:38:32Z")

</div>

It should be ansible\_ssh\_pass instead of ansible\_ssh\_password.

With that switch everything should work.
