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