git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: why multiple password prompts?

From
Jeff King <peff@peff.net>
Date
Mar 29, 2008, 22:11 UTC
Message-ID
<20080329221156.GE30851@coredump.intra.peff.net>
In-Reply-To
<20080329220543.GD30851@coredump.intra.peff.net>
On Sat, Mar 29, 2008 at 06:05:43PM -0400, Jeff King wrote:
Show 8 quoted lines
> > 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
Previous: Jeff KingNext: Bryan Donlan
Message 8 of 11 in “why multiple password prompts?”
  1. PaulMar 29, 2008
  2. Daniel BarkalowMar 29, 2008
  3. Jakub NarebskiMar 29, 2008
  4. Daniel BarkalowMar 29, 2008
  5. Martin LanghoffMar 29, 2008
  6. Daniel BarkalowMar 29, 2008
  7. Jeff KingMar 29, 2008
  8. Jeff KingMar 29, 2008
  9. Bryan DonlanMar 30, 2008
  10. Daniel BarkalowMar 30, 2008
  11. Bryan DonlanMar 30, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.