cit*_*lao 8 windows git ssh visual-studio-code git-for-windows
我在 Windows 上运行 OpenSSH,使用自 Autumn/Fall Creators Update 以来包含的内置 OpenSSH。
我在 PowerShell 中使用 ssh 效果很好,但 Visual Studio 远程开发(我猜 Windows 版的 Git?)没有使用我的 OpenSSH。相反,他们似乎使用 MinGW 的适用于 Windows SSH 客户端的 Git。这意味着我的所有ssh-add
ed 键都不存在于 VS 或 Git 中ssh-agent
。
如何让 Visual Studio(也许还有 Git?)使用内置的 OpenSSH 安装,以便我可以ssh-agent
在它们之间使用相同的功能?
以下是 SSH 在 PowerShell 中的样子:
c:\Users\myusername
> Get-Command ssh
CommandType Name Version Source
----------- ---- ------- ------
Application ssh.exe 7.7.2.1 C:\WINDOWS\System32\OpenSSH\ssh.exe
c:\Users\myusername
> Get-Command ssh-agent
CommandType Name Version Source
----------- ---- ------- ------
Application ssh-agent.exe 7.7.2.1 C:\WINDOWS\System32\OpenSSH\ssh-agent.exe
C:\Users\myusername
> Get-Command ssh-add
CommandType Name Version Source
----------- ---- ------- ------
Application ssh-add.exe 7.7.2.1 C:\WINDOWS\System32\OpenSSH\ssh-add.exe
c:\Users\myusername
> ssh-add -l
2048 SHA256:HASH_HERE C:\Users\myusername\.ssh\id_rsa (RSA)
Run Code Online (Sandbox Code Playgroud)
c:\Users\myusername
> Get-Command ssh
CommandType Name Version Source
----------- ---- ------- ------
Application ssh.exe 7.7.2.1 C:\WINDOWS\System32\OpenSSH\ssh.exe
c:\Users\myusername
> Get-Command ssh-agent
CommandType Name Version Source
----------- ---- ------- ------
Application ssh-agent.exe 7.7.2.1 C:\WINDOWS\System32\OpenSSH\ssh-agent.exe
C:\Users\myusername
> Get-Command ssh-add
CommandType Name Version Source
----------- ---- ------- ------
Application ssh-add.exe 7.7.2.1 C:\WINDOWS\System32\OpenSSH\ssh-add.exe
c:\Users\myusername
> ssh-add -l
2048 SHA256:HASH_HERE C:\Users\myusername\.ssh\id_rsa (RSA)
Run Code Online (Sandbox Code Playgroud)
我正在使用VS Code 远程开发。每次登录远程计算机时,系统都会提示我输入私钥密码。
如果没有私钥身份验证,系统会提示我输入登录密码(对于远程用户)。
免责声明:我在微软工作。
归档时间: |
|
查看次数: |
8979 次 |
最近记录: |