`ssh: connect to host ... port 22: Network is unreachable` from inside a container controller
IntermediateTroubleshootingConnection and SSH Failures
Answer
Likely causes → Container network has no route to the target subnet, VPN not available in the container, or IPv6/IPv4 mismatch.
Diagnose → docker exec ctl ip route, ping/nc from inside the container.
Fix → Run with --network host or attach to the right network, mount VPN config, or use a bastion in the inventory.
Prevent → Document the network model for the execution environment.
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