Re: why multiple password prompts?
From: Jeff King <hidden>
Date: 2016-06-15 22:44:26
On Sat, Mar 29, 2008 at 06:05:43PM -0400, Jeff King wrote:
quoted
That's cool - didn't know a rework of the ssh interactions had happened. It would be really good if we could detect if there's an existing "master" connection and piggyback over that (see options -M and -O). Reading man ssh_config it looks like we may be able to say something along the lines of " -o ControlMaster=auto ".I have been using this for at least a year with git; just put "ControlMaster auto" into your .ssh/config.
Oh, and if you are trying to achieve "doing two back-to-back ssh's
should only need one connection because of ControlMaster", that doesn't
work.
The master is closely tied to the first session, so it exits when that
session finishes.
I think more useful semantics for something like git would be
an opportunistic short-lived server. That is, 'ssh foo' would try:
- if .ssh/cache/foo does not exist, spawn "master"
- repeatedly try to connect via .ssh/cache/foo (since it
may take a while for the connection to be made, but
eventually time out if we can't do it)
The "master" would:
- listen on .ssh/cache/foo
- connect to 'foo' via ssh
- multiplex any incoming connections on .ssh/cache/foo on our session
- after N seconds of no active connections, close the ssh session
But that is an ssh problem, not a git problem at all.
-Peff