Skip to content

Instantly share code, notes, and snippets.

@hamzaakhtar953
Last active January 16, 2022 23:09
Show Gist options
  • Save hamzaakhtar953/591b5b3e36081533030d00f85c7b6b4b to your computer and use it in GitHub Desktop.
Save hamzaakhtar953/591b5b3e36081533030d00f85c7b6b4b to your computer and use it in GitHub Desktop.
Generate RSA public/private key pairs for JWT

Generate RSA public/private key pairs for JWT

NOTE: Run the following commands in linux environment to get private and public keys and copy/paste in your environment variables

STEP 1:

ssh-keygen -t rsa -b 4096 -m PEM -f rs256.key (NOTE: Don't add passphrase)

STEP 2:

openssl rsa -in rs256.key -pubout -outform PEM -out rs256.key.pub

STEP 3:

cat rs256.key cat rs256.key.pub

Link to Original Solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment