Created
September 8, 2019 13:36
-
-
Save keithrozario/da9e12e407392bc6ab61ab4161a680e9 to your computer and use it in GitHub Desktop.
gen_key
This file contains hidden or 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
mkdir key_gen/$1 | |
cd key_gen/$1 | |
ssh-keygen -t rsa -b 4096 -f key_gen/github_id_rsa -C [email protected] | |
openssl rand -base64 -out key_gen/secret.key 48 | |
key=$(<key_gen/secret.key) | |
openssl aes-256-cbc -e -in key_gen/github_id_rsa -out key_gen/github_id_rsa.enc -k $key | |
openssl aes-256-cbc -d -in key_gen/github_id_rsa.enc -out key_gen/github_id_rsa.dec -k $key |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment