Can I set SSH known_hosts to ignore a specific hostname?
Try this in your ssh_config
, this prevents ssh from saving the key, but only for this hostname.
Host raspberrypi.local
UserKnownHostsFile /dev/null
The manual also mentions StrictHostKeyChecking
:
If this flag is set to “no” or “off”, ssh will automatically add new host keys to the user known hosts files and allow connections to hosts with changed hostkeys to proceed, subject to some restrictions.
But I found no details on those restriction, and you don't want to save the hostkey anyway.