#987849 ssh: misleading "invalid format" message about public key when using private key

Package:
ssh
Source:
openssh
Description:
secure shell client and server (metapackage)
Submitter:
xavier renaut
Date:
2021-04-30 20:33:04 UTC
Severity:
wishlist
#987849#5
Date:
2021-04-30 20:22:56 UTC
From:
To:
Dear Maintainer,


   * What led up to the situation?

I deployed a new set of ssh-keys on a machine.
I installed (not on purpose) id_ed25519.pub with the from="ip" in front of the key.



   * What exactly did you do (or not do) that was effective (or
     ineffective)?

I'm trying to ssh from the host_1 to host_2

when running ssh from host_1 :
load pubkey "/home/devops/.ssh/id_ed25519": invalid format
xxxx@ypppp.com: Permission denied (publickey,password).

I assumed my private key was wrong here, thus ending in authentication failure
(turns out it was not related, it was an issue on host_2)

   * What was the outcome of this action?

I started investigating my private key.

   * What outcome did you expect instead?

instead of :
load pubkey "/home/devops/.ssh/id_ed25519": invalid format

I would like to see a .pub at the end, and also something that says "informational, non-critical, non-related to current operation"

Something like :
+FYI not related
+ .pub at the end of the file name :
+ s/pub/loading Public/

FYI, not related : loading Public key "/home/devops/.ssh/id_ed25519.pub": invalid format