Description
Allows you to use ssh keys through ssh-agent on Windows in WSL2 machine. Works with Keepass KeeAgent plugin or open-ssh-agent. This approach uses npiperelay.exe to forward Windows named pipe into WSL2.
Dependencies
- WSL2. You can check version with
wsl --list --verbose
socat
installed in your WSL.
sudo apt install socat
Installation
- Dowload repository as zip
- Extract files
- Run install.sh in WSL2
sudo install.sh
Manual installation
- download npiperelay and extract
npiperelay.exe
to/usr/local/bin/npiperelay.exe
- copy
wsl-ssh-agent-forwarder
to/usr/local/bin/wsl-ssh-agent-forwarder
- set execution permissions to
wsl-ssh-agent-forwarder
andnpiperelay.exe
- add line
. /usr/local/bin/wsl-ssh-agent-forwarder
to~/.bashrc
Origin
Based on strarsis Gist