We’re provided with an OpenSSH private key and a corrupted public key. Since an OpenSSH public key is determined by its private key, regenerating it shouldn’t be a problem.
And indeed, we find the -y option of ssh-keygen for this purpose:
-y This option will read a private OpenSSH format file
and print an OpenSSH public key to stdout.
So we use the following command:
ssh-keygen -f i-ve-lost-my-comment -y
And we get the complete public key:
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEhnlalzNKqkJshHrAqwmaphUt4Fg652Bei6Kb7hJp/G https://fcsc.fr/PsIg0VBu7n