Last active
September 25, 2023 16:07
-
Star 1,124
You must be signed in to star a gist -
Fork 256
You must be signed in to fork a gist
Star
You must be signed in to star a gist
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
ssh-keygen -t rsa -b 4096 -m PEM -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 |
Thanks!
BTW @ygotthilf you can add -N ''
to ssh keygen and it will not even ask for passphrase
awesome!!! Thx
Thanks! Nice and easy!
Awesome, thank youuu
many thanks
save my day, thanks
Thanks
Now, it doesn't work because newer version of
ssh-keygen
no longer usesPEM
format as default key format. It have changed toRFC4716
for default key format. Thus, I have to setPEM
format explicitly :
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
This will work 👍
In case anyone is getting an error from openssl, try this.
many thanks
thank you good sir!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks