Score:0

Create a public SSH key from the private key? Is an `ssh-ed25519` public key unrecoverable?

jo flag

I want to recover my ssh public key from my private key. I am aware of this answer but it doesn't seem to work for me. When I run the command suggested ssh-keygen -f ~/.ssh/my_key -y > ~/.ssh/my_key.pub I only get the algorithm ssh-ed25519 and an ssh fingerprint not the full public key. What am I missing?

I tried making a new key and testing the command, it worked as expected. Is there something about the algorithm?

It is worth noting that the original key pair was generated by AWS.

Romeo Ninov avatar
in flag
What is the content of first line of your private key?
medic17 avatar
jo flag
`-----BEGIN OPENSSH PRIVATE KEY-----` did you mean the first line of the actual cipher?
Romeo Ninov avatar
in flag
This is odd, from where you get this key?
in flag
Are you sure you don't get your public key? Curve algorithms (like ed25519) generate very short keys (a public key can be less than 70 bytes). Have you actually tried to use the resulting string as an SSH public key entry?
medic17 avatar
jo flag
@Lacek that was it. please add it as an answer so I can upvote it. meybe it will help someone else in the future. At least my hunch about the algorithm was right
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.