Stop SSH from asking you to verify keys you already know are good

SSH & Remote Administration

Stop SSH from asking you to verify keys you already know are good

🧩 The Challenge

Dealing with a fleet of identical VMs means running into that “REMOTE HOST IDENTIFICATION HAS CHANGED” warning every time I reprovision a test box. It’s annoying as hell, especially when you’re deep in an automation script that just hangs because it’s waiting for a manual yes prompt.

💡 The Fix

You can tell your local SSH client to just stop caring about key verification for specific subnets or internal development environments where you’re constantly blowing away and rebuilding instances.

Host 10.0.*.*
StrictHostKeyChecking no
UserKnownHostsFile /dev/null

⚙️ Why It Works

By redirecting the known hosts file to /dev/null, you effectively prevent the client from ever saving or checking the fingerprints. The StrictHostKeyChecking directive ensures the client doesn’t even bother asking for confirmation before connecting.

🚀 Pro-Tip: Only do this for isolated, trusted internal networks; don’t leave your door wide open on production edge servers.

Linux Tips & Tricks | © ngelinux.com | 8/11/2026

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted