Hi, The name of the identity file defaults to what fill_default_options() in readconf.c does: SSH_PROTO_1: "~/%.100s", _PATH_SSH_CLIENT_IDENTITY SSH_PROTO_2: "~/%.100s", _PATH_SSH_CLIENT_ID_RSA "~/%.100s", _PATH_SSH_CLIENT_ID_DSA Identity files are always expanded by tilde_expand_filename() which gets the name of the home directory from getpwuid(my_uid)->pw_dir. This is not what I expect (well, hope :-) when my UID is 0 but I'm not root. In other words: my username is dahlem, my UID is 0, my HOME dir is /home/dahlem. Ssh does not use /home/dahlem/.ssh/id_rsa but /.ssh/id_rsa. When I use "slogin remote -l dahlem" on the server side sshd doesn't search for my public key in /.ssh/authorized_keys but in /home/dahlem/.ssh/authorized_keys. At least this is a little inconsistent. It is not an alternative to define "IdentityFile /home/dahlem/.ssh/id_rsa" in /home/dahlem/.ssh/config: ssh is consistent on this side and uses /.ssh/config . Would a patch to read the name of the configuration file from an environment variable be accepted? I am able to provide such a patch. Regards, Robert
On Wed, 25 Aug 2004, Robert Dahlem wrote: [..]> > Identity files are always expanded by tilde_expand_filename() which gets > the name of the home directory from getpwuid(my_uid)->pw_dir. > > This is not what I expect (well, hope :-) when my UID is 0 but I'm not > root. >It's in bad form to have more than one UID 0 account. Heck any duplicate UID in general. A lot of software can't correctly identify which users and thus it will assume the first one found in a linear search of the password file. - Ben
Robert Dahlem wrote:> Identity files are always expanded by tilde_expand_filename() which gets > the name of the home directory from getpwuid(my_uid)->pw_dir. > > This is not what I expect (well, hope :-) when my UID is 0 but I'm not > root.[...]> It is not an alternative to define "IdentityFile > /home/dahlem/.ssh/id_rsa" in /home/dahlem/.ssh/config: ssh is consistent > on this side and uses /.ssh/config .alias ssh="ssh -o IdentityFile=/home/dahlem/.ssh/id_rsa" or alias ssh="ssh -F /home/dahlem/.ssh/config" ? -- Darren Tucker (dtucker at zip.com.au) GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69 Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.