-
-
Save abdollar/1504697 to your computer and use it in GitHub Desktop.
openssl notes
This file contains 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
# 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