Kode kloud engineer level 1 - challenge 1 Ansible Troubleshoot and Create Ansible Playbook

What did I do wrong here :

ansible all -a "ls -ltr /tmp/" -i inventory
stapp01 | UNREACHABLE! => {
    "changed": false,
    "msg": "Failed to connect to the host via ssh: [email protected]: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).",
    "unreachable": true
}
stapp02 | UNREACHABLE! => {
    "changed": false,
    "msg": "Failed to connect to the host via ssh: ssh: connect to host 172.238.16.204 port 22: Connection timed out",
    "unreachable": true
}
thor@jumphost ~/ansible$ cat inventory 
stapp02 ansible_host=172.238.16.204 ansible_user=steve  ansible_ssh_pass=Am3ric@  ansible_ssh_common_args='-o StrictHostKeyChecking=no'
stapp01 ansible_host=172.16.238.10  ansible_user=tony ansible_ssh_common_args='-o StrictHostKeyChecking=no'

Hi @rwobben

I think you also need to generate SSH keys and copy them to App Server2.

oke

I can do that this way

ssh-copy-id -i ~/.ssh/mykey user@host

Generate SSH keys using the default key names: id_rsa.