3

I set up SFTP server in my local PC (Windows 10) but I made a mistake and deleted the "known_hosts" and "known_hosts.old" file in ".ssh" folder. When I check Recycle Bin, only "known_hosts" exists. Is it ok if I deleted the known_hosts file? If I'm not allow to delete this file, how can I do to solve it.

1 Answers1

3

The known_hosts contains the key of the hosts you are trusting.

If the file is missing, or if you connect to an host the first time, ssh will ask you a confirmation and update the known_hosts if you confirm you are trusting the server.

Then the file is needed if an attacker manages to reroute your ssh connection to a fake ssh server. If you consider this kind of attack minimal, the deletion of the file should not be an issue.