/wsl-ssh-agent-proxy

WSL2 proxy for Windows SSH agent

Primary LanguageGoGNU General Public License v3.0GPL-3.0

WSL-SSH-Agent-Proxy

Windows 10 now has a built in SSH agent available; however, it does not work correctly within WSL2 VMs. This is a proxy on the WSL2 side to forward all requests to the Windows SSH agent.

Usage

  1. Start the SSH agent:

    # Set the SSH agent to start automatically; also consider going through
    # the service UI and setting it to delayed start instead.
    Get-Service -Name ssh-agent | Set-Service -StartupType Automatic
    # Start it for this session
    Start-Service ssh-agent
  2. Download the executable and save it somewhere.

  3. Set it to automatically start by appending to your ~/.bashrc:

    export SSH_AUTH_SOCK=~/.ssh/agent.sock # or anywhere else
    setsid ssh-agent-proxy &

Related Projects