-
-
Save kyungmi/d8f5c01c365416f8b6f4106cd6a5ac3d 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
#!/bin/sh | |
KEY_FILE_NAME=$1 | |
KEY_LENGTH=${2:-4096} | |
ssh-keygen -t rsa -m PEM -b ${KEY_LENGTH} -f ${KEY_FILE_NAME}.key -C "" | |
openssl rsa -in ${KEY_FILE_NAME}.key -pubout -outform PEM -out ${KEY_FILE_NAME}.key.pub | |
cat ${KEY_FILE_NAME}.key | |
cat ${KEY_FILE_NAME}.key.pub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
./keygen.sh key_file_name 4096