If you really want to keep CheckHostIP, you can turn it back on and disable it only for hosts with dynamic IPs to skip the warning and known_hosts pollution. Don't dobother doing this, thoughexcept in extreme circumstances. It's not that helpful.
It seems pretty unlikely that CheckHostIP is a meaningfulan underwhelming measure for dealing with a threat actor who can both…
In the face of such a foe, it seems ludicrous that somehow you'll be saved by the "Warning: Permanently added host key""Warning: Permanently added host key" message when connecting to a host, especially when it shows you the warning2 every single time.
In order to cut down on the super-long known_hosts entries, other people simulate IP ranges with wildcards, which may appear clever, but it's actually finicky3 and. This only works because CheckHostIP checks IPs and ignores hostnames. If it did the checks like it does on hostname, you'd be sunk.3
1 For some reason, this post ranks fairly high in search results for real host key leaks.
2 That is to say: "when it cries 'Wolf!'"
3 For example, if you try to allowlist 127.0.0.* in known_hosts for your dynamic-IP SSH server, you technically also match 127.0.0.evilsite.example because IPs and hostnames are not distinguished. You can limit wildcards to single characters with ?, but be careful: 127.0.0.?? will match 127.0.0.cz. Maybe it seems unlikely that .cz would allow 0 as a second-level domain, but we're talking about an adversary who is poisoning your DNS!