OpenSSH and $HOME

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Dear SSH Experts,

According to the OpenSSH documentation it keeps various files in places
relative to $HOME, e.g. $HOME/.ssh/known_hosts and so on.  But it seems
to me that rather than reading the environment variable $HOME it
actually looks up the user's home directory in /etc/passwd.

I was hoping to persuade ssh to look somewhere non-standard for these
files by temporarily setting $HOME, but this doesn't seem to be
possible. So, is there any other way to influence it, apart from
changing /etc/passwd (or hacking the source)?  Is there some good reason
why it uses /etc/passwd rather than the environment variable?  Would
people agree that this is a documentation bug?

This is with the Debian package of OpenSSH 3.8.1p1.

Many thanks,


Site Timeline