Using SSH Agent on Windows

November 10, 2021
2 minute read
security software

I use ssh a lot also on Windows for example to connect to Github or connect to Linux servers in the cloud and elsewhere. Many of these systems require an ssh_key and this can cause issues on Windows. VSCode for example has no means to let me enter the ssh passphrase so git pull/push fails.

The solution for this is to use an ssh agent. I had set up the putty peagent long time ago and actually didn’t remember the details when a colleague asked me how to do it. While trying to figure out how the config looked like and what I had on my system I came across this stack overflow response and realised that with the inclusion of OpenSSH in Windows 10 things have become way easier. Also I like using tools natively included rather than separate software.

Just in case the answer on stack overflow disappears here the steps in brief:

This is enough to use it for ssh connections.

For the use case of using git with ssh you will also need to set the environment variable GIT_SSH which tells git where to find the ssh binary. You want to make sure it points to the correct one, in our case the one from OpenSSH. In a default installation it is located at C:\Windows\System32\OpenSSH but it’s worth checking in a DOS commandline with where ssh. Set the variable to the response and you should be good to go.

Share on:

Logseq Sync Options

January 16, 2024
5 minute read
dendron logseq software productivity

How I add web articles to my personal knowledge base

October 29, 2023
3 minute read
dendron logseq software productivity

If your security architecture is largely based on protective measures, think again

September 3, 2023
3 minute read
security