Regenerate the public half from a private key.
Section: Key Generation
Extract public key from private key
bash
bash
ssh-keygen -y -f ~/.ssh/id_ed25519 > ~/.ssh/id_ed25519.pubExplanation
Regenerate the public half from a private key.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Key Generation
Generate an RSA key
Create an RSA key pair for compatibility when needed.
Generate a key without passphrase
Skip passphrase prompts, usually only for automation accounts.