Hello
I am trying to setup a home lab to support an Ansible course I am taking on Udemy. I am following the procedures from the instructor, who seems to not support his course anymore via Q&A. I am struggling with the ssh part to get a ping to the target VM’s. New to both Ansible and Ubuntu and always seem to struggle with keys in linux configs.
Here is my setup:
Windows 11 computer using VMware Workstation for the VM’s. The VM’s are Ubuntu VM’s. VM’s as of now are:
Control3 (where ansible is)
User is ansible on both control3 and db02
The course has an ansible directory in /home/ansible directory which I have.
There is also a .ssh directory there with the key files and authorized_hosts file
db02 (for a target system, will do more when I get ping to work)
Running ansible –list-hosts all does give me the list of hosts so that seems fine.
I am able to ssh into both control and db02 from my Windows 11 computer
There were procedures in the course to generate ssh-keygen -t rsa then to past the contents of the public file to an authorized_hosts file on I am assuming the control computer. I have done that with also doing generate ssh-keygen -t ecdsa
From the control3 I then run ansible -m ping db02 (right now just one host for the target until I get that to work) I get the following:
The authenticity of host ‘db02 (192.168.42.141)’ can’t be established.
ECDSA key fingerprint is 5b:ae:e0:a7:9c:08:85:0c:ec:60:e2:77:e6:d0:f3:67.
Are you sure you want to continue connecting (yes/no)? no
db02 | UNREACHABLE! => {
“changed”: false,
“msg”: “Failed to connect to the host via ssh: Host key verification failed.”,
“unreachable”: true
}
I am entering no right now as in the past when I hit yes it still didn’t work.
What am I doing wrong here?
Thanks.