On my mac I can’t edit ~/.ssh/known_hosts manually because it is locked. Right-click -> Get Info, then clicking on the bottom-right padlock unlocks the padlock icon, but the file remains locked.
This command also fails to unlock the file:
$ sudo chflags nouchg,noschg "~/.ssh/known_hosts"
How do I unlock ~/.ssh/known_hosts?