Skip to content

Instantly share code, notes, and snippets.

@justinsoliz
Forked from ygotthilf/jwtRS256.sh
Created September 16, 2018 01:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justinsoliz/71169e423d99ec1e0b1b5007d796f4aa to your computer and use it in GitHub Desktop.
Save justinsoliz/71169e423d99ec1e0b1b5007d796f4aa to your computer and use it in GitHub Desktop.
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@justinsoliz
Copy link
Author

justinsoliz commented Sep 16, 2018

using 2048
https://gist.github.com/ygotthilf/baa58da5c3dd1f69fae9#gistcomment-2157473

ssh-keygen -t rsa -b 2048 -f jwtRS256.key
# Don't add 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