Hello, I got a trouble with ssh command line when investigating a connection issue to a (Stash/Git) server. When invoking "ssh -p 7999 -i /path/to/my/id_dsa git at stashserver" I just got the answer "Permission denied (publickey)." I had to enable traces: "ssh -t -p 7999 -i /path/to/my/id_dsa git at stashserver" to understand why: debug1: Server accepts key: pkalg ssh-dss blen 433 debug1: could not open key file '/path/to/my/id_dsa': Permission denied debug1: No more authentication methods to try. Permission denied (publickey). In my opinion, I would expect that ssh command outputs to stderr the "could not open key file '/path/to/my/id_dsa': Permission denied" message when a identity file is explicitly given in options. What do you think about that error handling proposal ? Thank you for your attention Best regards -- Yves Martin
On Wed, 30 Apr 2014, Yves Martin wrote:> In my opinion, I would expect that ssh command outputs to stderr the "could > not open key file '/path/to/my/id_dsa': Permission denied" message when a > identity file is explicitly given in options.You neglected to mention which OpenSSH version you are using. Recent versions do warn: [djm at haru ~]$ ssh -i /root/xxx 127.0.0.1 Warning: Identity file /root/xxx not accessible: Permission denied.