<html theme="default-light" iconset="color"><head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body
text="#000000">
Hi,<br>
<br>
I was wondering if you could give me a pointer.<br>
<br>
I'm ssh'ing to a machine where I'm trying to run gpg, which I hope to
talk to the gpg-agent that's running on my local laptop, forwarded
through ssh.<br>
I'm following the instructions at <a
href="https://wiki.gnupg.org/AgentForwarding">https://wiki.gnupg.org/AgentForwarding</a>
but I don't know how to make gpg use a specific Unix socket to
communicate with my forwarded gpg-agent.<br>
<br>
The problem is that there's already a gpg-agent running at the remote (I
think started by systemd or the X server), which I don't want to
disturb. For my ssh connection, I try to create a new Unix domain
socket by using<br>
<span style="font-family: monospace;"> ssh -R
/run/user/1000/gnupg/S.gpg-agent.remote:/Users/troy/.gnupg/S.gpg-agent.extra
-o StreamLocalBindUnlink=yes -o ExitOnForwardFailure=yes</span><br>
<br>
But then how do I make gpg use<span style="font-family: monospace;">
/run/user/1000/gnupg/S.gpg-agent.remote</span> . It seems that gpg uses
gpgconf to figure out that path. And there's no flag or envvar that I
can use to override that (anymore).<br>
<br>
The only thing I can think of is to specify a new --homedir so that the
socket is created elsewhere, and then I'd have to change the port
forwarding to reflect the dynamically-generated path which will look
something like <span style="font-family: monospace;">/run/user/1000/gnupg/d.xhmoxiusfxtwuy8s69hkyxtc</span>
. So either I have to do two separate ssh calls or I have to use an
expect script to automate the addition of port forwarding on an existing
session. Plus, now the homedir is different and all my files are in
the wrong place.<br>
<br>
I hope I'm missing something obvious. Thanks for any ideas.<br>
<br>
I'm using:<br>
- Ubuntu 22.04.1 LTS<br>
- gpg (GnuPG) 2.2.27<br>
- OpenSSH_8.9p1 Ubuntu-3ubuntu0.1, OpenSSL 3.0.2 15 Mar 2022<br>
<br>
Troy<br>
</body>
</html>