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

Re: [PATCH] GIT_SSH alternate ssh name or helper

From
Junio C Hamano <junkio@cox.net>
Date
Aug 3, 2005, 19:29 UTC
Message-ID
<7v4qa6akek.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20050803185621.GA20645@medusa>
Martin Sivak <mars@nomi.cz> writes:
> I mean, how would you setup different identities for more user
> accounts on the same server (it doesn't happen often, but..)?

I do not claim the way I do is the best way, but I do that all the time.

I just use different "name" to connect, by setting up the ssh client configuration file to give me the protocol parameters I want depending on the name I use. The wildcard support handles permutations quite nicely. Something like this:

    $ cat .ssh/config
    Host *-1-*
      Protocol 1
    Host *-2-*
      Protocol 2
    Host lucia-*
      Hostname lucia.example.xz
    Host myriam-*
      Hostname myriam.example.xz
    Host *-junio
      IdentityFile ~/.ssh/identity-junio
      IdentityFile ~/.ssh/id_dsa-junio
    Host *-junkio
      IdentityFile ~/.ssh/identity-junkio
      IdentityFile ~/.ssh/id_dsa-junkio
    $ ssh lucia-2-junio ;# go to lucia over protocol 2, use id_dsa-junio
    $ ssh myriam-1-junkio ;# to myriam over protocol 1, use identity-junkio
Previous: Martin Sivak
Message 4 of 4 in “GIT_SSH alternate ssh name or helper”
  1. GIT_SSH alternate ssh name or helperMartin Sivak, Aug 3, 2005
  2. Junio C HamanoAug 3, 2005
  3. Martin SivakAug 3, 2005
  4. Junio C HamanoAug 3, 2005

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.