Skip to content
This repository has been archived by the owner on Feb 23, 2022. It is now read-only.
/ ssh-agent-relay Public archive

Make your WSL installation use your Windows SSH Agent

License

Notifications You must be signed in to change notification settings

anaisbetts/ssh-agent-relay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚧 DEPRECATED 🚧 - Use wsl-use-windows-openssh instead!

This project has a bunch of known issues, especially in newer versions of Windows. The above project works perfectly, doesn't have to run any extra programs on your computer, and is generally More Betterer in basically every way

ssh-agent-relay - Use your Windows SSH Agent in WSL2

This project sets up a relay for your SSH agent so that your WSL installation will use the SSH agent built into Windows. Did you know there's an SSH Agent built into Windows? What a world!

To enable the Windows SSH Agent (one-time only)

Via an Elevated PowerShell account:

Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
sc.exe config ssh-agent start=auto
net start ssh-agent

Then, add a key, in PowerShell:

ssh-add     ## Here's where you put in your password, once

To install

First install the dependencies, daemonize and socat:

yay -Sy daemonize socat

## or

apt install daemonize socat

Then, install it:

git clone https://github.com/anaisbetts/ssh-agent-relay

cd ssh-agent-relay
sudo make install

Now, open up ~/.bashrc or ~/.zshrc and add:

eval $(ssh-agent-relay)

Copy your SSH keys from the Windows side over to $HOME/.ssh and you're all set

About

Make your WSL installation use your Windows SSH Agent

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published