ssh-keygen

Create a new OpenSSH key pair.

ssh-keygen -t ed25519

Create a new OpenSSH key in PEM format.

ssh-keygen -t rsa -m PEM

Read a private OpenSSH format file and save/export the public key.

ssh-keygen -y -f key_file.pem > key_file.pub