Giter VIP home page Giter VIP logo

ssh-agent-wsl2's Introduction

wsl-ssh-agent

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 and npiperelay.exe
  • add line . /usr/local/bin/wsl-ssh-agent-forwarder to ~/.bashrc

Origin

Based on strarsis Gist

systemd

It is possible to use systemd service on WSL2 0.67+ instead. Update your wsl by command wsl --update --web-download Check what systemd enabled in /etc/wsl.conf

[boot]
systemd=true

Copy wsl-ssh-agent-relay.service to /etc/systemd/system folder.

systemctl daemon-reload
systemctl start wsl-ssh-agent-relay.service
systemctl enable wsl-ssh-agent-relay.service

Add export SSH_AUTH_SOCK=/var/run/wsl-ssh-agent.sock into ~/.bashrc

WSL docker wrapper

Description

Wrapper allows using docker command directly from windows converting Windows paths to paths inside WSL.

Installation

Uninstall docker-cli if it's installed.

Copy docker.bat into any location added to PATH. C:\bin for example

Copy wsl-docker-wrapper into /usr/local/bin inside WSL

Set execute permission chmod +x /usr/local/bin/wsl-docker-wrapper

Now you will be able to use docker commands from Windows and don't care about paths while mounting volumes.

ssh-agent-wsl2's People

Contributors

l0ser140 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.