Skip to content

Commit c18152f

Browse files
committed
Add ssh-agent-switcher: SSH agent proxy for tmux
ssh-agent-switcher is a daemon that proxies SSH agent connections to any valid forwarded agent provided by sshd. This allows long-lived processes such as terminal multiplexers like `tmux` or `screen` to access the connection-specific forwarded agents. The ssh-agent-switcher daemon solves this problem by exposing an SSH agent socket at a well-known location, allowing you to set `SSH_AUTH_SOCK` to a path that does *not* change across different connections. The daemon then looks for a valid socket every time it receives a request and forwards the request to the real forwarded agent.
1 parent e6ea93b commit c18152f

File tree

4 files changed

+41
-0
lines changed

4 files changed

+41
-0
lines changed

sysutils/ssh-agent-switcher/DESCR

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
ssh-agent-switcher is a daemon that proxies SSH agent connections to any valid
2+
forwarded agent provided by sshd. This allows long-lived processes such as
3+
terminal multiplexers like `tmux` or `screen` to access the connection-specific
4+
forwarded agents.
5+
6+
The ssh-agent-switcher daemon solves this problem by exposing an SSH agent
7+
socket at a well-known location, allowing you to set `SSH_AUTH_SOCK` to a path
8+
that does *not* change across different connections. The daemon then looks for
9+
a valid socket every time it receives a request and forwards the request to the
10+
real forwarded agent.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# $NetBSD: Makefile,v 1.1 2023/11/17 21:00:05 schmonz Exp $
2+
3+
DISTNAME= ${GITHUB_PROJECT}-${GITHUB_TAG}
4+
PKGNAME= ${GITHUB_PROJECT}-0.0.20231117
5+
CATEGORIES= sysutils
6+
MASTER_SITES= ${MASTER_SITE_GITHUB:=jmmv/}
7+
GITHUB_PROJECT= ssh-agent-switcher
8+
GITHUB_TAG= 3d5835ee0eeafdb2dd792f26d1decbed2c06dce8
9+
10+
MAINTAINER= schmonz@NetBSD.org
11+
HOMEPAGE= https://github.com/jmmv/ssh-agent-switcher/
12+
COMMENT= SSH agent proxy for tmux
13+
LICENSE= modified-bsd
14+
15+
USE_LANGUAGES= c
16+
17+
INSTALLATION_DIRS= share/doc/${PKGBASE}
18+
19+
post-install:
20+
${INSTALL_DATA} ${WRKSRC}/README.md ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
21+
22+
.include "../../lang/go/go-module.mk"
23+
.include "../../mk/bsd.pkg.mk"

sysutils/ssh-agent-switcher/PLIST

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@comment $NetBSD: PLIST,v 1.1 2023/11/17 21:00:05 schmonz Exp $
2+
bin/ssh-agent-switcher
3+
share/doc/ssh-agent-switcher/README.md
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
$NetBSD: distinfo,v 1.1 2023/11/17 21:00:05 schmonz Exp $
2+
3+
BLAKE2s (ssh-agent-switcher-3d5835ee0eeafdb2dd792f26d1decbed2c06dce8-3d5835ee0eeafdb2dd792f26d1decbed2c06dce8.tar.gz) = 38b8b28617f987d6b81cee17c8450d610e1ee5f721babcab13133035d885c24f
4+
SHA512 (ssh-agent-switcher-3d5835ee0eeafdb2dd792f26d1decbed2c06dce8-3d5835ee0eeafdb2dd792f26d1decbed2c06dce8.tar.gz) = 2b3a3f59284dbf18dfaceb2df151e6b4ecd88dcd44dc389e09f3000bfa2de0aa3da58c036d8aa1dba8eb68f32e08f07bcc200f31847d8a145989d99236cf7377
5+
Size (ssh-agent-switcher-3d5835ee0eeafdb2dd792f26d1decbed2c06dce8-3d5835ee0eeafdb2dd792f26d1decbed2c06dce8.tar.gz) = 7399 bytes

0 commit comments

Comments
 (0)