`Timeout (12s) waiting for privilege escalation prompt`
IntermediateTroubleshootingConnection and SSH Failures
Answer
Likely causes → sudo is asking for a password in a different form than expected, requiretty is set, a slow PAM or DNS lookup delays the prompt, or become_method does not match the host.
Diagnose →
ssh host 'sudo -n true'
ansible web01 -b -m ping -vvv
Check /etc/sudoers and /var/log/auth.log.
Fix → Increase timeout, fix DNS (/etc/hosts with the hostname), set ansible_become_method, or use passwordless sudo for the automation user.
Prevent → Make sure the hostname resolves locally on every target.
More on Connection and SSH Failures
`UNREACHABLE! => {"msg": "Failed to connect to the host via ssh: Permission denied (publickey,password)."}`Beginner`UNREACHABLE! => {"msg": "Failed to connect to the host via ssh: ssh: connect to host 10.0.1.15 port 22: Connection timed out"}`Beginner`UNREACHABLE! => {"msg": "Failed to connect to the host via ssh: ssh: connect to host web01 port 22: Connection refused"}`Beginner`Host key verification failed.` after rebuilding a serverBeginnerThe playbook hangs for ever at "Gathering Facts" on one hostIntermediate`Failed to connect to the host via ssh: Too many authentication failures`Intermediate