iso
8/24/2019 - 7:15 AM

encrypt and decrypt file using gpg

search key from keyserver

gpg --keyserver http://keys.gnupg.net/ --search-key keyname
gpg --keyserver http://keys.gnupg.net/ --recv-keys key_revc
gpg --import someone_public_key.asc
  
gpg --list-keys #should see someone_public_key note down the email
  
gpg --out file.gpg --encrypt --recipient someone_email file.txt

echo 'test' | gpg --encrypt --r someone_email > file.gpg