ssh-agent-multiplexer

command module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

README

ssh-agent-multiplexer

This is a small program which multiplexes running ssh agents.

If you wanted to aggregate two agents, just do below. Note that you must to specify one --add-target so that ssh-add <key> can add a key to the multiplexer agent.

$ ssh-agents-multiplexer --listen multiplex.sock --add-target agent1.sock --target agent2.sock
2022-09-28T23:06:59+09:00 INF revision=0dbfb04 version=0.0.1-dev
2022-09-28T23:06:59+09:00 INF Agent multiplexer listening listen=/var/folders/2s/41bhrr7d0r76pkkb9kgjtk0h0000gn/T/ssh-agent-multiplexer-90668.sock

Then, an multiplexed agent is listening at multiplex.sock. You can use the socket as an usual ssh agent.

$ export SSH_AUTH_SOCK=/var/folders/2s/41bhrr7d0r76pkkb9kgjtk0h0000gn/T/ssh-agent-multiplexer-90668.sock

# this shows all the keys in target agents
$ ssh-add -l

# this will add <private_key> to add-target
$ ssh-add <private_key>

# this removes <public_key> from a target keeping it
$ ssh-add -d <public_key>

# forward the multiplexing agent to some.host.  Thus, you can use all the key in target agents
$ ssh -A some.host

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