Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

git

ssh

git-bash

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?

like image 859
blueberryfields Avatar asked Dec 04 '13 17:12

blueberryfields


People also ask

Where are git ssh keys stored on Windows?

The public part of the key is saved in the id_rsa. pub file, while the private part is saved in the id_rsa file. Both files can be accessed from this location using Explorer: C:\Users\[your user name]\. ssh .

What is known_hosts in .ssh folder?

Definition(s): A file associated with a specific account that contains one or more host keys. Each host key is associated with an SSH server address (IP or hostname) so that the server can be authenticated when a connection is initiated.

Where does git bash store ssh keys?

SSH keys are stored in the ~/. ssh folder. You can have more than one key in there, because SSH keys are used for things other than Git.

Where does Plink store known_hosts?

So in windows known_hosts for PuTTY is SshHostKeys. that is stored at the HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\SshHostKeys location. To reach that location, the Registry Editor supposed to be used.


2 Answers

On my Windows PC it stored it in

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

like image 65
Axel Fontaine Avatar answered Sep 19 '22 19:09

Axel Fontaine


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)

like image 37
janos Avatar answered Sep 20 '22 19:09

janos