Skip to content

A set of systemd units to forward SSH agent socket from Windows to WSL.

License

Notifications You must be signed in to change notification settings

ciffelia/wsl-win32-openssh-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

wsl-win32-openssh-agent

A set of systemd units to forward SSH agent socket from Windows to WSL.

Requirements

  • WSL
    • systemd
    • OpenSSH
  • Windows
    • npiperelay
      • Install: scoop install extras/npiperelay
    • Win32-OpenSSH

NOTE: The OpenSSH agent protocol has changed in version 8.9. If OpenSSH v8.9 or later is installed in WSL and the Win32-OpenSSH is older than v8.9, the agent will not work. You can check the versions by running ssh -V in WSL and PowerShell.

If you are using an older version of Win32-OpenSSH, you can install the latest version with the following commands:

Remove-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
Remove-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
winget install "openssh beta"

You might need to restart the computer after running these commands to update the PATH.

Install

git clone https://github.com/ciffelia/wsl-win32-openssh-agent.git
cd wsl-win32-openssh-agent

# Edit the path to npiperelay.exe in bin/install.sh
sed -i 's|npiperelay.exe|/mnt/c/Users/path/to/npiperelay.exe|' systemd-unit/wsl-win32-openssh-agent@.service

./bin/install.sh

Uninstall

./bin/uninstall.sh

About

A set of systemd units to forward SSH agent socket from Windows to WSL.

Topics

Resources

License

Stars

Watchers

Forks

Languages