Default path to identity file

Robert Dahlem Robert.Dahlem at gmx.net
Wed Aug 25 21:47:09 EST 2004


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






More information about the openssh-unix-dev mailing list