Interview Prep/Ansible/Connection and SSH Failures

`msg: "Invalid/incorrect password: Sorry, try again."` when using `-K`

BeginnerTroubleshootingConnection and SSH Failures
Answer

Likely causes → Typed the login password instead of the sudo password, the account has no sudo rights, or the password differs per host.

Diagnose → ssh -t host sudo -v and enter the password manually.

Fix → Provide the right password via -K or ansible_become_password (vaulted).

Prevent → Use passwordless sudo with limited commands for the automation account.

All Ansible questions Roadmap: Ansible

More on Connection and SSH Failures