blueberryfields
blueberryfields

Reputation: 50328

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

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?

Upvotes: 12

Views: 24961

Answers (4)

Axel Fontaine
Axel Fontaine

Reputation: 35169

On my Windows PC it stored it in

C:\Users\[username]\AppData\Local\VirtualStore\Program Files (x86)\Git\.ssh

Upvotes: 25

russelrillema
russelrillema

Reputation: 462

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.

Upvotes: 0

betontalpfa
betontalpfa

Reputation: 3742

On my PC it can be found on another drive ( not on default C:/ )

H:\.ssh

Upvotes: 2

janos
janos

Reputation: 124646

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)

Upvotes: 10

Related Questions