Skip to content

Instantly share code, notes, and snippets.

@keithrozario
Created September 8, 2019 13:36
Show Gist options
  • Save keithrozario/da9e12e407392bc6ab61ab4161a680e9 to your computer and use it in GitHub Desktop.
Save keithrozario/da9e12e407392bc6ab61ab4161a680e9 to your computer and use it in GitHub Desktop.
gen_key
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