Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ciffelia/wsl-win32-openssh-agent
A set of systemd units to forward SSH agent socket from Windows to WSL.
https://github.com/ciffelia/wsl-win32-openssh-agent
ssh ssh-agent systemd wsl wsl2
Last synced: 14 days ago
JSON representation
A set of systemd units to forward SSH agent socket from Windows to WSL.
- Host: GitHub
- URL: https://github.com/ciffelia/wsl-win32-openssh-agent
- Owner: ciffelia
- License: apache-2.0
- Created: 2024-04-12T17:30:04.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-04-12T19:18:20.000Z (10 months ago)
- Last Synced: 2024-11-17T20:52:11.503Z (3 months ago)
- Topics: ssh, ssh-agent, systemd, wsl, wsl2
- Language: Shell
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# wsl-win32-openssh-agent
A set of systemd units to forward SSH agent socket from Windows to WSL.
## Requirements
- WSL
- systemd
- OpenSSH
- Windows
- [npiperelay](https://github.com/jstarks/npiperelay)
- Install: `scoop install extras/npiperelay`
- Win32-OpenSSHNOTE: 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:
```powershell
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.
- https://zenn.dev/mametter/articles/49a2b505ec0275
- https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse?tabs=powershell#uninstall-openssh-for-windows
- https://github.com/PowerShell/Win32-OpenSSH/wiki/Install-Win32-OpenSSH## Install
```sh
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/[email protected]./bin/install.sh
```## Uninstall
```sh
./bin/uninstall.sh
```