-
-
Save ddpruitt/79c002f4ca4970d200b697a96d570ab6 to your computer and use it in GitHub Desktop.
How to generate JWT RS256 key
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# From "How to generate a JWT RS256 key" Gist <https://gist.github.com/ygotthilf/baa58da5c3dd1f69fae9> | |
# | |
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
# NOTE: Don't add a passphrase when prompted: | |
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
# | |
# On Windows use the openssl.exe in the git usr\bin folder. | |
# C:\Users\USERNAME\AppData\Local\Programs\Git\usr\bin\openssl | |
# | |
# It is also possible to just do it with ssh-keygen (https://gist.github.com/ygotthilf/baa58da5c3dd1f69fae9#gistcomment-2855422) | |
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
ssh-keygen -e -m PEM -f jwtRS256.key > 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