SSH command line behavior with explicit identity file
Yves Martin
ymartin1040 at gmail.com
Fri May 2 20:18:05 EST 2014
Hello,
Here is a test case to show the trouble I got:
touch test
chmod 000 test
Now compare
ssh -i test localhost
and
ssh -t -i test localhost
I have checked behavior in both Debian Wheezy version: OpenSSH_6.0p1
Debian-4+deb7u1, OpenSSL 1.0.1e 11 Feb 2013 and Ubuntu LTS 14.04 version
6.6p1-2ubuntu1
Thanks to strace, I guess the "not accessible" warning is only produced
when "stat" syscall is not possible on identity file.
In my test case, "stat" returns 0 as the file exists and is accessible. But
permission bits prevent me to read it so the "open" call fails.
So when using an explicit identity file in options, I would expect ssh
command outputs to stderr the "could not open key file
'/path/to/my/id_dsa': Permission denied" message.
Thank you for your attention
Best regards
--
Yves Martin
More information about the openssh-unix-dev
mailing list