如何从 FileZilla FTP 客户端中的密钥缓存中提取 SFTP SSH 密钥
我已使用 FileZilla 通过 SFTP 连接到服务器,并接受将服务器的 SSH 密钥添加到 FileZilla 中的密钥缓存中。
如何将此缓存密钥提取到密钥文件中,以便可以通过需要提供密钥文件的其他 SFTP 应用程序使用它?
我在 FileZilla 文档中找不到与此相关的任何内容。
I have connected to a server via SFTP using FileZilla and accepted adding the server's SSH key to the key cache in FileZilla.
How can I extract this cached key to a keyfile so that may use it through other SFTP applications that require a keyfile be made available?
I have not been able to find anything in the FileZilla documentation related to this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
由于这是(至少是我的)Google 搜索结果,我认为现在有一种更简单的方法:
当使用 FileZilla 连接到服务器时,右下角有一个小锁,您可以单击。 它显示包括指纹在内的连接详细信息。 双击指纹时,它会发送到您的剪贴板。
Since this was (at least my) top Google result and I think there is an easier way now:
When connected to a server with FileZilla, there is a little lock in the bottom right corner you can click on. It shows the connection details including the fingerprint. When doubleclicking the fingerprint it gets send to your clipboard.
除非我误解了你的意思:你不需要。
如果您使用另一个应用程序(即:PuTTY)连接到服务器,并且它之前没有见过该服务器,那么系统将提示您接受密钥。
我明白为什么您可能想要这样做,但每个应用程序都可以有自己的方式来存储密钥。
Unless I am misunderstanding you: you don't need to.
If you connect to the server with another application (ie: PuTTY) and it has not seen the server before then you will be prompted to accept the key.
I see why you might want to do this, but each application could have it's own way to store keys.
感谢道格曼的提示!
为了进一步帮助任何新人阅读您的答案。
在运行 ssh-keyscan 之前,假设默认安装了 openssh,需要运行一些命令(有关详细信息,请阅读快速入门/自述文件安装)。
以下是允许我获取主机密钥的命令。
Thanks Dougman for the tip!
To further help any newcomers reading your answer.
Prior to running the ssh-keyscan, assuming the openssh is install by default, there is a few commands that needs to be run (read the quickstart/readme install for details).
Here are my commands which allow me to obtain the host key.
如果您更愿意使用 GUI,则可以使用 WinSCP FTP 客户端从日志窗口或首次连接弹出窗口中获取主机密钥:https://winscp.net/eng/docs/ssh_verifying_the_host_key
If you'd rather use a GUI, you can snag the host key from the log window or the first-time connection popup using WinSCP FTP client: https://winscp.net/eng/docs/ssh_verifying_the_host_key
托马斯是对的。 FileZilla 搭载 PuTTY 的 PSFTP 程序,并将以十六进制格式编码的已保存密钥存储在他列出的注册表项 (HKCUR\Software\SimonTatham\PuTTY\SshHostKeys) 中。 我需要known_hosts格式的密钥,所以我能够根据他的推荐安装windows版本的openssh并使用ssh-keyscan 工具来访问服务器并以正确的格式保存密钥信息:
谢谢 Thomas 和 SO!
Thomas was correct. FileZilla piggybacks on PuTTY's PSFTP program and stores the saved keys encoded in a hex format at the registry key he listed (HKCUR\Software\SimonTatham\PuTTY\SshHostKeys). I needed the key in known_hosts format, so I has able to install a windows version of openssh at his recommendation and used the ssh-keyscan tool to hit the server and save the key info out in the correct format:
Thank you Thomas and SO!
如果您使用标准 openssh 控制台客户端(cygwin 或来自 linux),主机密钥将每行一个存储在 ~/.ssh/known_hosts 中。 从那里,找出您的库需要该主机密钥的哪一部分就很简单了。
Putty 还存储主机密钥,但它似乎以十六进制对它们进行编码。 这些可以在 HKCUR\Software\SimonTatham\PuTTY\SshHostKeys 中找到
If you use the standard openssh console client (cygwin or from linux), host keys are stored, one-per-line, in ~/.ssh/known_hosts. From there, it's a simple matter of figuring out which bit of that host key is needed for your library.
Putty also stores host keys, but it appears to encode them in hex. Those can be found at HKCUR\Software\SimonTatham\PuTTY\SshHostKeys