Skip to content

Instantly share code, notes, and snippets.

@blpabhishek
Created December 21, 2019 04:46
Show Gist options
  • Save blpabhishek/f3f990a79905ac0b2ed017c2828d2c57 to your computer and use it in GitHub Desktop.
Save blpabhishek/f3f990a79905ac0b2ed017c2828d2c57 to your computer and use it in GitHub Desktop.
ssh key encryption
ssh-keygen -m PEM -t rsa -b 4096
openssl rsa -in identity -pubout
echo content | openssl rsautl -encrypt -pubin -inkey identity.pub.pem > ciphertext.txt
openssl rsautl -decrypt -inkey identity -in ciphertext.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment