blob: 8e43d4d105c76b5e10cd9341fb188c893ac5c822 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#!/usr/bin/env bash
if [ -z "$1" ];then
printf "USAGE: %b TARGET [OPTIONS...]\\n" "$(basename "$0")" >&2
exit 1
fi
TGT="$1"
REMUID="$(ssh "$TGT" "id -u")"
if [ -z "$REMUID" ];then
printf "Cannot fetch user id from %b.\\n" "$TGT" >&2
exit 2
fi
ssh -R "/run/user/${REMUID}/gnupg/S.dirmngr":"/run/user/$(id -u)/gnupg/S.dirmngr" -o "StreamLocalBindUnlink=yes" "$TGT" "${ _æ_ :2}"
|