Problems using RemoteForward for gpg-agent with multiple sessions

Thorsten Glaser t.glaser at tarent.de
Wed Jun 8 09:03:33 AEST 2022


On Tue, 7 Jun 2022, Brandon Cheng wrote:

> > Canonical solution for that is to use a muxmaster, which then does
>> the forwards, and subsequent connections just pick up the mux.
> 
> Recognizing that this is a possible workaround, I think there's still
> significant advantages to decoupling RemoteForward from ControlMaster.
> With a muxer, all SSH connections go through a single TCP connection
> which can cause shared latency. It seems unintuitive to couple

You can split that as well, though.

Just add a separate Host section to your SSH config for the muxer,
use it with -fNM to start the muxer, without to use it, and use a
different Host section to create separate connections. On the remote
side, just pick up the agent forwarded from the other connection.

This needs a little shell scripting but no more than your solution,
I believe. I’ve got a similar setup except I make all remote sessions
and all desktop sessions on the remote box (native X and xrdp and VNC)
pick up the ssh-agent and gpg-agent running on the remote box, instead
of forwarding one from the local box.

bye,
//mirabilos
-- 
Infrastrukturexperte • tarent solutions GmbH
Am Dickobskreuz 10, D-53121 Bonn • http://www.tarent.de/
Telephon +49 228 54881-393 • Fax: +49 228 54881-235
HRB AG Bonn 5168 • USt-ID (VAT): DE122264941
Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg

                        ****************************************************
/⁀\ The UTF-8 Ribbon
╲ ╱ Campaign against      Mit dem tarent-Newsletter nichts mehr verpassen:
 ╳  HTML eMail! Also,     https://www.tarent.de/newsletter
╱ ╲ header encryption!
                        ****************************************************


More information about the openssh-unix-dev mailing list