paramiko: The authenticity of host '192.168.33.110' can't be established.

ansible v1.7.2, running on CentOS release 5.8 (Final)

Sorry for the newbie question, but I’m just starting out with ansible. I’ve set up the SSH public key and a very basic inventory file /etc/ansible/hosts with vm private_network ip. But when I try

$ ansible all -m ping

I get failures like this:

paramiko: The authenticity of host ‘192.168.33.110’ can’t be established.

The ssh-rsa key fingerprint is 558e664be75be1ce063dd32c66069e5b.

Are you sure you want to continue connecting (yes/no)?

yes

192.168.33.110 | FAILED => FAILED: No authentication methods available

I have authorized_keys under .ssh

[vagrant@machine2 .ssh]$ ls -la

total 24

drwx------ 2 vagrant vagrant 4096 Jan 3 2013 .

drwx------ 5 vagrant vagrant 4096 Nov 21 15:22 …

-rw------- 1 vagrant vagrant 409 Jan 3 2013 authorized_keys

[vagrant@machine2 .ssh]$ cat authorized_keys

ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp2…

Here is configuration in vagrantfile

config.vm.define ‘dev’ do |machine|

machine.vm.hostname = ‘machine2’

machine.vm.network “private_network”, ip: “192.168.33.110”

end

I could do ping on the private_network’s ip.

[vagrant@machine2 ~]$ ping 192.168.33.110

PING 192.168.33.110 (192.168.33.110) 56(84) bytes of data.

64 bytes from 192.168.33.110: icmp_seq=1 ttl=64 time=0.057 ms

64 bytes from 192.168.33.110: icmp_seq=2 ttl=64 time=0.034 ms

As you see, ansible used itself ssh-rsa key fingerprint: 558e664be75be1ce063dd32c66069e5b, which is different from the authorized_keys I defined. So what key should I use? should I generate a private key? but I want to use my public key. How could I make it work? or make my first Ad-Hoc Ansible command work?

There is no /etc/ansible/ansible.cfg or ~/.ansible.cfg file.

Thanks,
Diana

The first prompt about verifying the hosts is a "known_hosts issue",
ssh keeps this file to verify that the host you are accessing is the
host you know about, in case someone hijacks the IP/dns/fqdn and
presents itself as the same host.

on why you cannot access the host, can you ssh normally into the host?
also using -vvvv with ansible will show debug information about the
connection that might be helpful to figure this out.

Hi Brian,

Thanks for the reply.
I think you are right. It is a “known_hosts” issue. And I can’t ssh to the host. I’m working on it. I will let you know when the issue is resolved.

Diana