From: Junio C Hamano <junkio@cox.net>
To: Nicolas Vilz 'niv' <niv@iaglans.de>
Cc: git@vger.kernel.org
Subject: Re: git + ssh + key authentication feature-request
Date: Wed, 08 Feb 2006 14:56:15 -0800 [thread overview]
Message-ID: <7v4q39o3xs.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <43EA7D57.7040409@iaglans.de> (Nicolas Vilz's message of "Thu, 09 Feb 2006 00:23:03 +0100")
Nicolas Vilz 'niv' <niv@iaglans.de> writes:
> in my case it would be only one system-user which has full access to
> several repositories. At this time, the users which use that account,
> have to give a password, which isn't that bad... it would be easier
> and more secure for me, not to give a password, but ask the users for
> the ssh pubkey..
I do not know where you are getting the password idea.
The conclusion of that thread is that it is not worth trying to
co-mingle more than one physical developer into one home
directory, and does not have much to do with use of password or
public key authentication.
That thread describes:
- you can use ssh public key authentication for developers;
- you do not have to give them full shell access by using
git-shell;
- HOWEVER you cannot tell each developers apart if you add one
key per developer to the same $HOME/.ssh/authorized_keys file.
The last point is not about git at all, but comes from how ssh
daemon operates. It roughly goes like this:
- The client says "I am me at the remote host, use this public
key to prove that to the other end". Often you do not have
to give -l and -i but when you fully spell out the command
line, it would be something like:
$ ssh -l me -i identity-file remote.host.example.com
Your client sends "me" and the public key to the remote end.
- The ssh daemon running on the remote site says, "Hmph, let's
see if you are really "me" as you claim." It does the
following things:
1. Look "me" up from its user database (be it /etc/passwd,
NIS or LDAP) to find out the user's home directory.
Let's say the "struct passwd.pw_dir" says it is
"/home/me".
2. Check to see if /home/me/.ssh/authorized_keys exists, all
the elements in the path to the file is secure (e.g. if
/home/me/.ssh can be modified by somebody other than
"me", what is in authorized_keys is not trustworthy).
That means /home/me/.ssh/authorized_keys must be owned by
"me" and at least mode 0644 or stricter.
3. Reads the keys in that file, and finds what is sent as
the public key from the client.
4. Uses that public key to challenge the client to make sure
the client has the corresponding private key.
What this implies is that sharing the home directory among
multiple UNIX users would not work with ssh daemon the way you
expect. The check in step 2 would fail for all but one user.
Being able to list more than one key in authorized_keys is so
that you can use more than one key to become the _same_ user,
and does not give you the ability to become a user other than
the one that owns that home directory on that remote host.
So while you could make a repository "/pub/project.git" the home
directory of _one_ UNIX user, and store her key in the file
"/pub/project.git/.ssh/authorized_keys", that would not work
very well for a shared repository setup if you want to be able
to tell more than one physical users apart.
You _could_ tell them to use the same -l option and log-in as
the same UNIX user with their own keys, though. But that way
you cannot tell which developer pushed into the repository (of
course if you trust the commits, commit log message would say
the committer ident).
next prev parent reply other threads:[~2006-02-08 22:56 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-08 22:42 git + ssh + key authentication feature-request Nicolas Vilz 'niv'
2006-02-08 21:58 ` Junio C Hamano
2006-02-08 23:23 ` Nicolas Vilz 'niv'
2006-02-08 22:45 ` Linus Torvalds
2006-02-09 0:43 ` Nicolas Vilz 'niv'
2006-02-08 22:56 ` Junio C Hamano [this message]
2006-02-09 0:14 ` Mark Wooding
2006-02-09 0:40 ` Junio C Hamano
2006-02-09 0:55 ` Mark Wooding
2006-02-09 0:33 ` Nicolas Vilz 'niv'
2006-02-08 23:50 ` Linus Torvalds
2006-02-09 1:16 ` Nicolas Vilz 'niv'
2006-02-08 23:55 ` Junio C Hamano
2006-02-09 1:06 ` Nicolas Vilz 'niv'
2006-02-08 23:35 ` Alan Chandler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7v4q39o3xs.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=niv@iaglans.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox