I'm using the Visual Studio Code Remote - SSH extension on a Windows 10 laptop to access a bunch of Linux development servers. I followed these instructions to set up the Windows built-in ssh-agent service, which is basically a few lines in an Administrator PowerShell terminal...
Set-Service ssh-agent -StartupType Automatic
Start-Service ssh-agent
Get-Service ssh-agent
This allows me to run ssh-add
from a Command Prompt to install a private key, after which ssh
, scp
, sftp
etc can connect to the remote host without needing the key passphrase, as can VSCode itself.
I also have Cygwin installed on the laptop, so my question is: how do I configure it so that those instances of the OpenSSH programs can access the Windows ssh-agent service? I guess there's a magical setting for SSH_AUTH_SOCK
but how do I find out what it is? Yes, I could use keychain to load keys into a Cygwin-hosted ssh-agent
process, but that means I have to type all the passphrases twice.
For now I've simply uninstalled the OpenSSH package in Cygwin so that bash runs the Windows version of ssh
etc from /cygdrive/c/Windows/System32/OpenSSH
, but I'd like to do it properly instead. Thanks for your help!
0 Answers