Remove SSH known hosts on Windows
The quick:
Open a Windows File Explorer and type:
%USERPROFILE%\.ssh
This brings you to the .ssh directory that has the known_hosts file in it.
Open the known_host file delete the key that is causing you problems.
A bit more bloggy:
Due to the nature of the work I do, I often use the same IP address for the systems I install, this makes it easier for me to manage them. Unfortunately, this means that the ‘duplicate’ Linux systems raise security flags when I attempt to ssh into a new machine.
In order to solve this, I either use PuTTY, or, more often than not, I simply delete the offending SSH key so I can use Powershell.
The easiest way to delete the keys are to:
- Open Windows File Explorer
- Go to this location: %USERPROFILE%\.ssh
- Open the known_hosts file
- delete the key of the IP that is causing you issues
Hope this helps someone