Re: OpenSSH and $HOME

From: Darren Tucker (dtucker_at_gate.dodgy.net.au)
Date: 06/14/05


Date: 14 Jun 2005 12:54:06 GMT

On 2005-06-14, Phil Endecott <phil_nn05@chezphil.org> wrote:
> 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)?

Depends on the file. See, eg, "-F" in ssh(1) and "IdentityFile" in
ssh_config(5).

What exactly are you trying to achieve?

> Is there some good reason
> why it uses /etc/passwd rather than the environment variable?

The environment variable is under the control of the user, and some parts,
especially sshd, use it for authentication material.

> Would people agree that this is a documentation bug?

Yes, but it's already been fixed:

Date: 2005/05/26 02:04:02
[...]
   - djm@cvs.openbsd.org 2005/04/21 06:17:50
     [ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh.1 ssh_config.5 sshd.8]
     [sshd_config.5] OpenSSH doesn't ever look at the $HOME environment
     variable, so don't say that we do (bz #623); ok deraadt@

-- 
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.