How to Encrypt Files with GPG Updated on March 9, 2021 by Christopher Maiorana 1 Minutes, 36 Seconds to Read No matter if you're a developer, system administrator, or simply a fan of SSH and command line, InMotion's Cloud Hosting plans provide a fast, scalable environment that is budget-friendly. Encrypting files with GNU Privacy Guard (GPG) is one of the best known ways to protect your most critical data. If you have already followed our guide on creating a GPG key, you are now ready to encrypt files using your key, rendering these files readable only to people you have designated. Most Often Used to Secure Email How to Encrypt Files with GPG Other Security-related Resources Most Often Used to Secure Email GPG is commonly used to send encrypted email back and forth between two or more parties. If you have any kind of secret or proprietary information, using email encryption is the best way to make sure the content is readable only by the people you trust. But when not used for email, GPG can be used to encrypt individual files or archived files. If you don’t want to set up encryption in your email client, or if you don’t have the privilege, you can still encrypt individual files and send them as attachments. How to Encrypt Files with GPG For more information be sure to check out the GPG documentation. There are two important parts of the encryption process. First, you have to associate a key with the file so that the GPG program knows which key to use. But to make it easier, and faster, you can sign and encrypt a file with one command—if you use the correct options. gpg --encrypt -r <[email protected]> <file.txt> What do these options mean? --encrypt As it indicates, “encrypt” will create an encrypted copy of the file. -r “Recipient” indicates that you will provide an email address (associated with a key) to use for encrypting this file. Other Security-related Resources Check out these other resources from the Support Center: 6 Ways to Learn More About Cybersecurity The Basics of Cybersecurity for Website Owners Why Security is Important for Small Business Websites Share this Article CM Christopher Maiorana Content Writer II Christopher Maiorana joined the InMotion community team in 2015 and regularly dispenses tips and tricks in the Support Center, Community Q&A, and the InMotion Hosting Blog. More Articles by Christopher Related Articles Resetting the cPanel Password in WHM How to Change your root Password in WHM How to Stop and Disable Firewalld Content Security Policy (CSP) Headers – Complete Reference Guide Why You Need To Keep Your Website’s PHP Version Up-to-Date Learning About Mod_security and Disabling Mod_security Close Open Ports for PCI Compliance How to Pass PCI Compliance Scans DDoS Protection Using Corero How to Open a Port in Firewalld