Pin the nodes' SSH host keys so CI can verify them - #318
Conversation
The first CI deploy got all the way to SSH and failed on "Host key verification failed": host_key_checking is on, and a fresh runner has no cached keys, so strict checking correctly refused an unknown host. The keys are now pinned in infra/ansible/known_hosts and ansible.cfg points UserKnownHostsFile at it with StrictHostKeyChecking=yes. This does not weaken anything -- it strengthens it: CI and every laptop now verify against the same committed keys, instead of trusting whatever each operator accepted on first connection. The connection was already authenticated end-to-end by Cloudflare Access before SSH; this closes the one remaining gap without turning checking off. They are public keys, safe to commit. A reprovision changes a node's key and fails the deploy loudly here until the file is updated -- which is the correct behaviour, not a silent accept-new. Verified: `ansible all -m ping` connects to both nodes through the pinned known_hosts (pong from control and execution). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughAnsible now enables strict SSH host-key checking and uses a repository-provided ChangesSSH host-key verification
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~4 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The pinned host-key configuration is consistent with the supported CI and developer deployment commands. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The first CI deploy (#317) reached SSH and failed on "Host key verification failed" -- strict host-key checking is on and a fresh runner has no cached keys, so it correctly refused an unknown host.
The keys are now pinned in infra/ansible/known_hosts, and ansible.cfg points UserKnownHostsFile at it with strict checking. This strengthens things: CI and every laptop verify against the same committed keys instead of trusting whatever each operator accepted first. The connection is already authenticated end-to-end by Cloudflare Access before SSH; this closes the last gap without turning checking off.
Public keys, safe to commit. A reprovision changes a key and fails the deploy loudly here until the file is updated -- correct, not a silent accept-new.
Verified: ansible all -m ping returned pong from both nodes through the pinned known_hosts.
🤖 Generated with Claude Code
Summary by CodeRabbit