Skip to content

Instantly share code, notes, and snippets.

@rbrooks
Created October 27, 2016 14:45
Show Gist options
  • Save rbrooks/bdca0cd7801fe4d68f24e9f0c7422180 to your computer and use it in GitHub Desktop.
Save rbrooks/bdca0cd7801fe4d68f24e9f0c7422180 to your computer and use it in GitHub Desktop.
Create Public/Private keypair in PEM format for JWTs
# ssh-keygen creates Keys that aren't in PEM format, but JWT tokens mandate
# PEM format. So, we have to convert them with OpenSSL.
ssh-keygen -t rsa -b 4096 -f jwtRS256.key
# Press Enter when prompted for passphrase.
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment