繁体   English   中英

Visual Studio Code Remote - 通过 KeePass/KeeAgent 使用密钥 SSH 失败

[英]Visual Studio Code Remote - SSH with key via KeePass / KeeAgent fails

我在机器 A 和机器 B 之间使用 Visual Studio 中的远程 ssh 插件时遇到问题,其中密钥由机器 A 上的 KeePass 数据库中的 KeeAgent 提供。

机器 A 在 Windows 10 上运行,我已经根据指南在 Visual Studio Code 中正确设置了主机(机器 B)。 但是,在尝试使用远程功能时,出现以下错误:

[09:48:32.111] Log Level: 2
[09:48:32.121] remote-ssh@0.51.0
[09:48:32.121] win32 x64
[09:48:32.124] SSH Resolver called for "ssh-remote+XXX.XXX.XXX.XXX", attempt 1
[09:48:32.125] SSH Resolver called for host: XXX.XXX.XXX.XXX
[09:48:32.125] Setting up SSH remote "XXX.XXX.XXX.XXX"
[09:48:32.314] Using commit id "91899dcef7b8110878ea59626991a18c8a6a1b3e" and quality "stable" for server
[09:48:32.317] Install and start server if needed
[09:48:38.141] getPlatformForHost was canceled
[09:48:38.142] Resolver error: Connecting was canceled
[09:48:38.147] ------

其中XXX.XXX.XXX.XXX显然是我输出中机器 B 的正确 IP。

正如我所提到的,这台机器的 SSH 密钥是通过 KeeAgent 提供的,并且可以与 PuTTy 一起正常工作。 我不允许在机器 A 上以明文形式存储 SSH 密钥,因此使用 Keepass/KeeAgent 解决方案。 我想这是问题所在,不知何故 Visual Studio Code 无法与 KeeAgent 一起使用。

我可以解决这个问题,即告诉 VS Code 使用 plink.exe 作为与 KeeAgent 一起使用的 SSH 客户端吗? 或者 VS Code 是否允许对 SSH 密钥本身进行加密存储,从而使 KeeAgent 过时? 我是 VS Code 和 remote-ssh 插件的新手,所以如果我的问题有明显的解决方案,我很抱歉。

也许问题出在其他地方。 在这种情况下,我感谢每一个提示。

谢谢!

转到Options > KeeAgent ,然后向下滚动到Agent Mode Options并激活Enable agent for Windows OpenSSH (experimental): (default: disabled) Enable an SSH agent socket compatible with the built-in Windows 10 SSH client

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM