Interview Prep/Jenkins/Agents, executors & the queue

SSH agent: `Host key verification failed.` or `No entry currently exists in the Known Hosts file for this host`

IntermediateTroubleshootingAgents, executors & the queue
Answer

Likely causes → Host key verification strategy is "Known hosts file" and the agent's key is not in the controller's known_hosts, or the agent was rebuilt with a new host key.

Diagnose → Check the node's Host Key Verification Strategy and ~jenkins/.ssh/known_hosts on the controller.

Fix → Add the new key (ssh-keyscan -t ed25519 10.0.4.12 >> known_hosts after verifying it out of band) or use "Manually provided key" in the node config.

Prevent → Manage host keys as code; do not use "Non verifying" strategy.

All Jenkins questions Roadmap: Jenkins

More on Agents, executors & the queue