git bash 中的 ssh 客户端在哪里存储它在 Windows 上的 known_hosts 文件?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20381493/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Where does the ssh client in git bash store it's known_hosts file on windows?
提问by blueberryfields
I'm running a git bash on windows 7, and would like to remove a few hosts from the known_hosts file.
我在 Windows 7 上运行 git bash,并想从 known_hosts 文件中删除一些主机。
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?
我似乎在任何地方都找不到 .ssh 目录。在 Windows 7 上,git bash 中包含的 ssh 客户端在哪里存储它的已知主机?
采纳答案by janos
Git Bash stores the known hosts in ~/.ssh/known_hosts
;-)
Git Bash 将已知主机存储在~/.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.
无论该文件在哪里。例如,当您在 Git Bash 中时,您可以编辑文件vim ~/.ssh/known_hosts
。
--
——
(by default ~ is at /c/Users/[user_name] so /c/Users/[user_name]/.ssh/known_hosts
)
(默认情况下 ~ 位于 /c/Users/[user_name] 所以/c/Users/[user_name]/.ssh/known_hosts
)
回答by Axel Fontaine
On my PC it stored it in
在我的电脑上,它存储在
C:\Users\[username]\AppData\Local\VirtualStore\Program Files (x86)\Git\.ssh
C:\Users\[username]\AppData\Local\VirtualStore\Program Files (x86)\Git\.ssh
回答by betontalpfa
On my PC it can be found on another drive ( not on default C:/ )
在我的 PC 上,它可以在另一个驱动器上找到(不是在默认的 C:/ 上)
H:\.ssh
H:\.ssh
回答by russelrillema
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.
就像在其他情况下一样。