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 :)
Straight to the point - thanks for this.
thanks
This piece of short code/information should be include in JWT packages documentation...
I was fighting against ssh keys formats and this completely solved the problem.
Thanks
Thank you
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
Thanks, it's work for me.
Works perfect! Thank you!!!!!
Thanks!
How to convert multi-line public and private key to single-line
so that it can be put in an environment variable
Thanks!
Thanks
Thanks!
Cool! Thanks.
Hello, can JWT work with a passphrased key?
Thanks a lot.
Thanks a lot
Thanks a lot. Super helpful.!
like
thank you for this. you saved me.
Thanks for this! If you want to replace all the new lines with literal \n
characters you can use the following awk command: awk -v ORS='\\n' '1' jwtRS256.key
. It leaves an extra \n
at the end of the line though.
https://stackoverflow.com/questions/38672680/replace-newlines-with-literal-n/38674872
It is also possible to just do it with
ssh-keygen
:ssh-keygen -t rsa -P "" -b 4096 -m PEM -f jwtRS256.key ssh-keygen -e -m PEM -f jwtRS256.key > jwtRS256.key.pub
thanks @bentocin, works like a charm!
Many Thanks
It is also possible to just do it with
ssh-keygen
:ssh-keygen -t rsa -P "" -b 4096 -m PEM -f jwtRS256.key ssh-keygen -e -m PEM -f jwtRS256.key > jwtRS256.key.pub
Works great for me! Thanks!
How can i use RS384 algorithm in above command to create rsa public and private key.
It's also possible to generate keys using
openssl
only:openssl genrsa -out private.pem 2048 openssl rsa -in private.pem -pubout -out public.pem
very thanks
Thanks so much!
I'm sorry I'm still new to this but does the private key go to .gitignore
or both the public and private key go to .gitignore
?
Thanks so much!
I'm sorry I'm still new to this but does the private key go to.gitignore
or both the public and private key go to.gitignore
?
To my best knowledge:
Where you put them depends on your secrets management. We don't put either of it in the repo. This information is rather specific to your deployment and can be considered as part of the environment. It is not specific to your application and thus should be treated accordingly.
Depending on your project setup some of the following solutions might be suitable for you:
Another option might be to create them ad-hoc during your deployment.
Hi @bentocin,
Thanks again for the detailed answer, I looked up a few posts on the intenet and you answer makes sense to me now.
I decided to not put either of it in the repo.
Really appreciate your help and solutions!
Cool!
thank you!
Thanks for this! Works nicely!
Perfect, Thanks!
Thank you!!
thank you :))
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
thanks so much!!
Thank you so much!
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
Worked for me! Thank you
@KenjiFukudome thx
Thank you
Thanks you
Thanks! :)
Thanks so much!
Thanks
Thanks
It's also possible to generate keys using
openssl
only: