Skip to content

Instantly share code, notes, and snippets.

@dgrijalva
Created September 6, 2011 19:42
Show Gist options
  • Save dgrijalva/1198745 to your computer and use it in GitHub Desktop.
Save dgrijalva/1198745 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