# ansible noob trying to ping hosts in hosts file

**URL:** <https://forum.ansible.com/t/ansible-noob-trying-to-ping-hosts-in-hosts-file/20679>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [February 25, 2016, 3:25pm UTC](https://forum.ansible.com/t/ansible-noob-trying-to-ping-hosts-in-hosts-file/20679 "2016-02-25T15:25:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![markpattisondev](https://avatars.discourse-cdn.com/v4/letter/m/96bed5/32.png) [@markpattisondev](https://forum.ansible.com/u/markpattisondev)\
**Post date:** [February 25, 2016, 3:25pm UTC](https://forum.ansible.com/t/ansible-noob-trying-to-ping-hosts-in-hosts-file/20679/1 "2016-02-25T15:25:33Z")

</div>

Hi there.

I just installed ansible on ubuntu 15 and am going through the getting started documentation found here: [http://docs.ansible.com/ansible/intro\_getting\_started.html](http://docs.ansible.com/ansible/intro_getting_started.html)  
I’ve added two servers to my hosts file… but when I try to ping them using ansible, it fails because the system is actually prompting me with this:

> me@mydevbox:~$ ssh [root@10.20.30.40](mailto:root@10.20.30.40)  
> The authenticity of host ‘10.20.30.40 (10.20.30.40)’ can’t be established.  
> ECDSA key fingerprint is SHA256:OjtURI5grpQL+pS+OTwuoNryCDvPzk9p3HbZ00dY5f0.  
> Are you sure you want to continue connecting (yes/no)? yes  
> Failed to add the host to the list of known hosts (/home/me/.ssh/known\_hosts).  
> \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* ATTENTION \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> 
> - Unauthorized access prohibited. Activity is logged. \*
> 
> * * *
> 
> 15:08:18 up 15 days, 18:31, 0 users, load average: 0.07, 0.06, 0.09  
> lab-box-1:~# exit

I’m trying to find a way to suppress that message … and i thought that by successfully logging into the box / server would get rid of it. but it keeps appearing.  
Any suggestions ?

---

<div class="post-metadata">

**Author:** ![Dennis\_Klein](https://avatars.discourse-cdn.com/v4/letter/d/c5a1d2/32.png) [@Dennis\_Klein](https://forum.ansible.com/u/Dennis_Klein)\
**Post date:** [March 2, 2017, 11:45am UTC](https://forum.ansible.com/t/ansible-noob-trying-to-ping-hosts-in-hosts-file/20679/2 "2017-03-02T11:45:29Z")

</div>

Have you added your public key in the ~/.ssh/authorized\_keys file on the hosts to be allowed to log in with your ssh key?
