How can I decrypt a .pgp file to .txt file using a key(.asc file) with the Linux command line.
Asked
Active
Viewed 6.1k times
16
Sathyajith Bhat
- 62,374
RichMo
- 161
1 Answers
19
Import your private key:
cat mykey.asc # should start with -----BEGIN PGP PRIVATE KEY BLOCK-----
gpg --import mykey.asc
Check if it shows up:
gpg --list-secret-keys
Decrypt a message:
gpg --output ./decrypted_msg.txt --decrypt ./encrypted_msg.txt
Michael D.
- 988