PGP file decryption from Linux cmd line
Emily Wong
How can I decrypt a .pgp file to .txt file using a key(.asc file) with the Linux command line.
1 Answer
Import your private key:
cat mykey.asc # should start with -----BEGIN PGP PRIVATE KEY BLOCK-----
gpg --import mykey.ascCheck if it shows up:
gpg --list-secret-keysDecrypt a message:
gpg --output ./decrypted_msg.txt --decrypt ./encrypted_msg.txt 3