ssh-agent-bridge

command module
v0.0.0-...-48a7ecc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 31, 2022 License: MIT Imports: 17 Imported by: 0

README

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL