Velvet Star Monitor

Standout celebrity highlights with iconic style.

updates

PGP file decryption from Linux cmd line

Writer 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.asc

Check if it shows up:

gpg --list-secret-keys

Decrypt a message:

gpg --output ./decrypted_msg.txt --decrypt ./encrypted_msg.txt
3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy