From 0e550f2efb0c56e510dd5c2ef4e9d764624dd026 Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Sun, 24 Nov 2019 14:48:43 +0000 Subject: [PATCH] bin: archive ssh-gpg script --- bin/old/ssh-gpg | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 bin/old/ssh-gpg diff --git a/bin/old/ssh-gpg b/bin/old/ssh-gpg new file mode 100755 index 0000000..736dadc --- /dev/null +++ b/bin/old/ssh-gpg @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +remote_socket="$(ssh "$@" gpgconf --list-dirs agent-socket)" +local_socket="$(gpgconf --list-dirs agent-extra-socket)" +[[ ! -S "$local_socket" ]] && local_socket="$(gpgconf --list-dirs agent-socket)" +[[ ! -S "$local_socket" ]] && gpg-connect-agent /bye + +ssh -R"$remote_socket":"$local_socket" "$@" -- 2.48.1