This article documents using Pageant to manage SSH keys for VS Code Remote.

1. Assumptions

2. Introduction

VS Code Remote Development doesn’t support Pageant out of the box.⁠[1] More specifically, VS Code Remote Development uses the Windows 10 native OpenSSH client and the OpenSSH client doesn’t support Pageant. A bridge is needed to make Pageant available to the OpenSSH client.

This is where wsl-ssh-pageant comes in. wsl-ssh-pageant can make Pageant available to WSL or the Windows OpenSSH client. We are going to use it to make Pageant available to the Windows OpenSSH client.

3. Install wsl-ssh-pageant

Download wsl-ssh-pageant-amd64-gui.exe from the latest release of wsl-ssh-pageant[2]

4. Setup wsl-ssh-pageant

  1. Open the startup directory by pressing ⊞Win+R and typing shell:startup↵
  2. Create a .bat file with the following content⁠[3]

    @ECHO OFF
    SETX SSH_AUTH_SOCK \\.\pipe\ssh-pageant
    START /B "" "C:\SSH\wsl-ssh-pageant-amd64-gui.exe" --systray --winssh ssh-pageant
  3. Run the .bat file

5. Use VS Code Remote Development

Open VS Code and connect to a remote host. You should no longer be prompted for a password.


  1. As of VS Code v1.51.
  2. wsl-ssh-pageant v20201121.2 as of this writing.
  3. Sourced from microsoft/vscode-remote-release#61.