Monday, 2 April 2018

ssh - Where is the known_hosts file for OpenSSH for Windows?


One of the servers I frequently log into via SSH has changed it's IP address. So, now I'm getting man in the middle attack warnings when I try to use SSH via Windows Powershell and OpenSSH for Windows.


On a linux machine, I would just remove the offending line from ~/.ssh/known_hosts. But, the ~/.ssh directory seems to be empty.


Where is the known_hosts file for Powershell/OpenSSH? I've checked in C:\Program Files\OpenSSH\home\anschauung\.ssh, but that folder is empty as well.



Answer



On windows it is usually stored in the %USERPROFILE%\ssh or %USERPROFILE%\.ssh folders. If you type %USERPROFILE% into the Windows explorer address bar it will be expanded automatically. You can also try cd /d "%USERPROFILE%\ssh" or cd /d "%USERPROFILE%\.ssh" from a command prompt.


Also see: https://stackoverflow.com/questions/32945533/is-there-a-definitive-path-for-known-hosts-in-windows


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...