logoalt Hacker News

ghshephardyesterday at 8:38 PM2 repliesview on HN

I don't think there has been a single month in the last 5 years that I haven't had to figure out which public-key was used to authenticate me to a host via `ssh -vv` - often to let someone else who is failing to connect know which key to use.

The `-Z` is less useful - as I almost always know exactly which and what order the public keys are - as most of our sshd instances fail after 5 attempts - so making sure either (A) the correct ones or used or (clumsily, B) - just putting the correct one in the first five to try.

Would be a nice feature to echo which key successfully worked.


Replies

seethishattoday at 12:41 AM

This is why I keep a ~/.ssh/config file. I store all the hosts and various connection parameters (uernames, alternate ports, keys, etc.) in that file.

Would that work for you?

stingraycharlesyesterday at 10:48 PM

Yup, or the alternative: is authentication failing because I have too many public keys and it just stopped trying after N keys?