Bug 2720 - Include username in "Permission denied (publickey)." message
Summary: Include username in "Permission denied (publickey)." message
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh (show other bugs)
Version: 7.2p2
Hardware: Other Linux
: P5 enhancement
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks: V_7_6
  Show dependency treegraph
 
Reported: 2017-05-23 08:45 AEST by jg
Modified: 2021-04-23 15:03 AEST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jg 2017-05-23 08:45:43 AEST
Can SSH include the username in the following message? It was the only reason login failed, but wasn't clear.

Currently this is the behaviour:
$ ssh -i "pass.pem" myserver123.amazonaws.com
Permission denied (publickey).

It of cause works if I do:
ssh -i "pass.pem" ubuntu@myserver123.amazonaws.com

What I would like to see is:

$ ssh -i "pass.pem" myserver123.amazonaws.com
juser@myserver123.amazonaws.com
Permission denied (publickey).

This means, we would realise that "juser" didn't have an account on that VM at Amazon.

Sound reasonable?
Comment 1 Darren Tucker 2017-06-14 10:40:04 AEST
Done, thanks.  It will be in the 7.6 release.

$ ssh -i /tmp/key localhost
dtucker@localhost: Permission denied (publickey,password,keyboard-interactive,hostbased).
Comment 2 jg 2017-06-14 11:37:25 AEST
Thank you Darren
Comment 3 Damien Miller 2021-04-23 15:03:36 AEST
closing resolved bugs as of 8.6p1 release