# ssh keys

**URL:** <https://forum.ansible.com/t/ssh-keys/23539>\
**Category:** Ansible Project\
**Created:** [January 23, 2017, 11:09pm UTC](https://forum.ansible.com/t/ssh-keys/23539 "2017-01-23T23:09:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jithendra\_myla](https://avatars.discourse-cdn.com/v4/letter/j/7ab992/32.png) [@jithendra\_myla](https://forum.ansible.com/u/jithendra_myla)\
**Post date:** [January 23, 2017, 11:09pm UTC](https://forum.ansible.com/t/ssh-keys/23539/1 "2017-01-23T23:09:05Z")

</div>

i trying run ansible command on new server which i didn’t copied my public ssh keys, i want to try talking to that remote linux using ssh user name and passwd and also with providing ssh-private keys to talk to instantly with out passwd, below is the script i written and error i am getting not sure where i am doing wrong

_[ansible@centos2 playbook]$ cat first.yml_  
_— # try ubuntu1_  
_- hosts: [ubuntu1.ohari.com](http://ubuntu1.ohari.com)_  
_connection: ssh_  
_remote\_user: ansible_  
_vars\_files:_  
_- values.property_

_tasks:_  
_- name: check dir_  
_shell: ls -ltr /var/tmp_  
_register: result_  
_- debug: var=result_

[ansible@centos2 playbook]$ cat values.property  
ansible\_ssh\_private\_key\_file: ~/.ssh/id\_rsa  
ansible\_ssh\_pass: papakaka  
[ansible@centos2 playbook]$

**[ansible@centos2 playbook]$ ansible-playbook first.yml**

**PLAY [[ubuntu1.ohari.com](http://ubuntu1.ohari.com)] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\***

**TASK [setup] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\***  
**fatal: [[ubuntu1.ohari.com](http://ubuntu1.ohari.com)]: UNREACHABLE! =\> {“changed”: false, “msg”: “Authentication or permission failure. In some cases, you may have been able to authenticate and did not have permissions on the remote directory. Consider changing the remote temp path in ansible.cfg to a path rooted in "/tmp". Failed command was: ( umask 77 && mkdir -p "`echo $HOME/.ansible/tmp/ansible-tmp-1485212780.65-250431407683253`" && echo ansible-tmp-1485212780.65-250431407683253="`echo $HOME/.ansible/tmp/ansible-tmp-1485212780.65-250431407683253`" ), exited with result 1”, “unreachable”: true}**  
**to retry, use: --limit @/home/ansible/playbook/first.retry**

**PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\***  
**[ubuntu1.ohari.com](http://ubuntu1.ohari.com) : ok=0 changed=0 unreachable=1 failed=0**

**[ansible@centos2 playbook]$**

**Thank you very much for your help, it is really appreciated.**

---

<div class="post-metadata">

**Author:** ![jithendra\_myla](https://avatars.discourse-cdn.com/v4/letter/j/7ab992/32.png) [@jithendra\_myla](https://forum.ansible.com/u/jithendra_myla)\
**Post date:** [January 24, 2017, 5:44pm UTC](https://forum.ansible.com/t/ssh-keys/23539/2 "2017-01-24T17:44:41Z")

</div>

It’s working now, after updated the /etc/ansible/ansible.cfg file with below values  
from  
remote\_tmp = $HOME/.ansible/tmp

to  
remote\_tmp = /tmp/.ansible/tmp

Jithendra
