Sometimes you just playing around with one of your device and put static IP for the MAC address on your router, so you never bother with dynamic IP, but the drawbacks is that when you try SSH to that device show errors “WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!” and of course the solution is you must remove host key from known_hosts on your computer.
The traditional way or maybe the usual I do is open known_hosts file at /Users/darto/.ssh/known_hosts and then delete line as shown. But there is simple way without we open first the file known_hosts, with command:
ssh-keygen -R 192.168.31.31 # Host 192.168.31.31 found: line 22 # Host 192.168.31.31 found: line 23 /Users/darto/.ssh/known_hosts updated. Original contents retained as /Users/darto/.ssh/known_hosts.old
I hope this post make me remember the command (•‿•).