Where does the ssh client in git bash store it's known_hosts file on windows?

Viewed 19535

I'm running a git bash on windows 7, and would like to remove a few hosts from the known_hosts file.

I can't seem to find a .ssh directory anywhere. Where does the ssh client included with git bash store it's known hosts, on Windows 7?

4 Answers

Git Bash stores the known hosts in ~/.ssh/known_hosts ;-)

Wherever that file really is. When you are in Git Bash, you can edit the file with vim ~/.ssh/known_hosts for example.

--

(by default ~ is at /c/Users/[user_name] so /c/Users/[user_name]/.ssh/known_hosts)

I find mine in

C:\Windows\System32\.ssh

Though I wish I could set it to be

C:\Users\[username]\.ssh

as it is in other instances.

Related