Skip to content
ohsudo, Home

Tags

#inventory

UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh
Infrastructure as Code

Ansible "UNREACHABLE! Failed to connect to the host via ssh": find the real SSH error

Fix Ansible UNREACHABLE: read the SSH error in the message, check the inventory, reproduce with -vvv and plain ssh, then fix keys, users or host keys.

Beginner · 4 min read