Skip to content

Instantly share code, notes, and snippets.

@abdollar
Forked from dgrijalva/gist:1198745
Created December 21, 2011 05:19
Show Gist options
  • Save abdollar/1504697 to your computer and use it in GitHub Desktop.
Save abdollar/1504697 to your computer and use it in GitHub Desktop.
openssl notes
# Convert ssh-rsa key to pem
ssh-keygen -f infile.pub -e -m PKCS8 > outfile.pem
# Encrypt a file using public key pem
openssl rsautl -encrypt -inkey public.pem -pubin -in file.txt -out file.ssl
# Decrypt using private key
openssl rsautl -decrypt -inkey private.pem -in file.ssl -out decrypted.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment