Giter Site home page Giter Site logo

amurzeau / ssh-agent-bridge Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 101 KB

Bridge from/to any of pageant, Git Bash ssh-agent, Win32 OpenSSH agent and WSL unix sockets (AF_UNIX)

License: MIT License

Go 100.00%
git-bash openssh pageant powershell-ssh ssh-agent ssh-agent-forwarding windows bridge

ssh-agent-bridge's Introduction

ssh-agent-bridge

This tool can bridge multiple ssh-agent protocols to one ssh-agent. Supported protocols are:

  • pageant
  • Git for Windows ssh-agent
  • OpenSSH Win32 ssh-agent (Windows pipe)
  • WSL ssh-agent socket using Windows' AF_UNIX sockets

This tool can listen for any of these and forward agent queries to any of these too.

Usage

Run ./ssh-agent-bridge.exe --help:

Usage of ssh-agent-bridge.exe:
  -debug
        enable debug logs
  -from string
        comma-separated list of endpoint to listen on, available: all, pipe, cygwin, wsl, pageant (cygwin also work for Git for Windows)
  -no-gui-error
        don't show a message box for fatal error
  -pipe string
        path to the pipe to use for pipe mode (default "\\.\pipe\openssh-ssh-agent")
  -to string
        endpoint to use as upstream agent, available: cygwin, wsl, pageant, pipe (cygwin also work for Git for Windows) (default "pageant")
  -cygwin-socket string
        path to the ssh-agent unix socket for cygwin-ssh-agent mode (default to SSH_AUTH_SOCK env variable)
  -wsl-socket string
        path to the WSL ssh-agent unix socket for wsl-ssh-agent mode (defaults to SSH_AUTH_SOCK env variable)

Usage example

Forwarding requests to pageant, from all of:

  • Cygwin/Git for Windows on /tmp/ssh-0PcrJrq8KjAL/agent.418 (the cygwin path /tmp will be converted internally to %TMP%)
  • Win32 OpenSSH on \\.\pipe\openssh-ssh-agent (the default)
  • WSL socket on C:\wsl-ssh-agent.sock

Command line:

./ssh-agent-bridge.exe \
  --from cygwin,pipe,wsl \
  --to pageant \
  --cygwin-socket C:/git-bash-ssh-agent.sock \
  --wsl-socket C:/wsl-ssh-agent.sock

Then:

  • In git bash, set export SSH_AUTH_SOCK=/c/git-bash-ssh-agent.sock
  • In WSL, set export SSH_AUTH_SOCK=/mnt/c/wsl-ssh-agent.sock

ssh-agent-bridge's People

Contributors

amurzeau avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

cluck

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.