Bitwarden SSH agent in WSL2 via a systemd user service (socat + npiperelay) — with the gotchas that make ssh-add hang A developer created a systemd user service to bridge Bitwarden Desktop's SSH agent from Windows to WSL2 using socat and npiperelay, solving hanging issues with ssh-add. The solution requires the standalone Bitwarden build (not the Microsoft Store version) and disabling Windows' native ssh-agent. Use the SSH keys stored in your Windows Bitwarden Desktop vault from inside WSL2 — ssh , git , ssh-add , etc. — managed by a systemd user service instead of a fragile .zshrc snippet. This bridges the Windows OpenSSH-agent named pipe that Bitwarden exposes \\.\pipe\openssh-ssh-agent to a Unix socket inside WSL using npiperelay https://github.com/albertony/npiperelay + socat .It is a hardened version of the excellent walkthrough at https://www.rebelpeon.com/bitwarden-ssh-agent-on-wsl2/ https://www.rebelpeon.com/bitwarden-ssh-agent-on-wsl2/ , with fixes for the problems that make ssh-add -l hang. Windows │ WSL2 │ Bitwarden Desktop standalone build │ └─ \\.\pipe\openssh-ssh-agent ◀────────┼── npiperelay.exe ◀── socat ◀── ~/.ssh/agent.sock one pipe instance │ per connection listener ▲ │ │ │ ssh / git / ssh-add SSH AUTH SOCK A systemd user service runs one persistent socat listener. socat forks a short-lived npiperelay.exe for each incoming connection, which relays bytes to Bitwarden's named pipe. The Microsoft Store / Appx build of Bitwarden Desktop runs in a UWP AppContainer sandbox and does not serve the SSH agent to external clients . The pipe appears and connections open , but Bitwarden never replies — so everything hangs, including the native Windows ssh-add.exe . Check what you have PowerShell : Get-AppxPackage Bitwarden if this prints anything, you have the Store build — uninstall it Fix — remove the Store/Appx build, then install the standalone build: Remove the Store Appx build. winget can't uninstall it by that name, so use Appx: Get-AppxPackage Bitwarden | Remove-AppxPackage Install the standalone build validated winget id : winget install Bitwarden.Bitwarden Or download the desktop installer from https://bitwarden.com/download/ https://bitwarden.com/download/ . Bitwarden → Settings → SSH agent → Enable SSH agent . Have at least one SSH key item in your vault, and keep the vault unlocked the agent only answers while unlocked . It would fight Bitwarden for the same pipe name. PowerShell admin : Stop-Service ssh-agent Set-Service ssh-agent -StartupType Disabled - WSL2 with systemd enabled — /etc/wsl.conf : then boot systemd=true wsl --shutdown from Windows once socat installed: sudo apt install socat npiperelay.exe on the Windows side. Easiest:then find the path it lives under winget install albertony.npiperelay C:\Users\