`UNREACHABLE! => {"msg": "Failed to connect ... Connection closed by 10.0.1.15 port 22"}`
IntermediateTroubleshootingConnection and SSH Failures
Answer
Likely causes → AllowUsers or AllowGroups excludes the user, TCP wrappers, fail2ban, or unsupported key algorithm (for example ssh-rsa disabled on newer OpenSSH).
Diagnose →
ssh -vvv [email protected]
# server side
journalctl -u sshd -n 50
Fix → Add the user to AllowUsers, or use an Ed25519 key. For old targets only, -o PubkeyAcceptedAlgorithms=+ssh-rsa as a stopgap.
Prevent → Keep sshd hardening in a role that always includes the automation user.
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