Bug#1024568: openssh-client: ignores $HOME environment variable
Package: openssh-client
Version: 1:8.9p1-3
Severity: normal
Tags: upstream
Dear Maintainer,
I tried to run ssh client in a test environment with files (known_hosts, config etc.)
from other than my usual /home/kissg/.ssh/ directory.
So after reading the docs I just modified the HOME environment variable to /tmp/kissg.
However the program henceforward used the original /home/kissg/.ssh/.
Checking the source I found that - in contrast to the man page - ssh client does not care
with $HOME(*) but always uses home dir retrieved from passwd file.
(So I have to give every file in the command line one by one.)
*: More precisely strace shows that ssh tried to open "/tmp/kissg/.ssh/config_autotest" once:
newfstatat(AT_FDCWD, "/tmp/kissg/.ssh/config_autotest", 0x7ffda93d3cf0, AT_SYMLINK_NOFOLLOW) = -1 ENOENT (No such file or directory)
That is quite funny because this file name does not occur in the source.
Regards
Gabor Kiss
-- System Information:
Debian Release: bookworm/sid
APT prefers jammy-updates
APT policy: (500, 'jammy-updates'), (500, 'jammy-security'), (500, 'jammy')
Architecture: amd64 (x86_64)
Kernel: Linux 5.15.74.2-microsoft-standard-WSL2 (SMP w/8 CPU threads)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages openssh-client depends on:
ii adduser 3.118ubuntu5
ii dpkg 1.21.1ubuntu2.1
ii libc6 2.35-0ubuntu3.1
ii libedit2 3.1-20210910-1build1
ii libfido2-1 1.10.0-1
ii libgssapi-krb5-2 1.19.2-2
ii libselinux1 3.3-1build2
ii libssl3 3.0.2-0ubuntu1.7
ii passwd 1:4.8.1-2ubuntu2
ii zlib1g 1:1.2.11.dfsg-2ubuntu9.2
Versions of packages openssh-client recommends:
ii xauth 1:1.1-1build2
Versions of packages openssh-client suggests:
pn keychain <none>
pn libpam-ssh <none>
pn monkeysphere <none>
pn ssh-askpass <none>
-- no debconf information
Reply to: