Secure your file on cloud
Keeping important files like authentication details or server etc , its very sensitive information, so be careful with it.
Its good to have your encrypted file on cloud, whenever any disaster happens you are able to recover your fileĀ
Passphrase-based encryption using GPG:
GPG (GNU Privacy Guard) is a free and open-source software suite used for encrypting, decrypting, and signing data. It is a widely used tool for securing communications and files. GPG is compatible with the OpenPGP standard, which provides a framework for encrypting and digitally signing data.
Linux (Debian/Ubuntu):
sudo apt-getupdate
sudo apt-get install gnupg
macOS (Homebrew):
brew install gnupg
Encryption with Passphrase
gpg --symmetric --cipher-algo AES256 your_file.txt
After running this command, GPG will prompt you to enter a passphrase. This passphrase will be used to encrypt and later decrypt the file.
gpg --symmetric --cipher-algo AES256 -o encrypted_file.txt.gpg your_file.txt
Decryption with Passphrase
gpg --decrypt your_file.txt.gpg
The decrypted content will be displayed directly in your terminal,
and GPG won't create or save any files.
If you want to save the decrypted content to a file,
you need to use the -o option to specify the output filename:
gpg --decrypt -o decrypted_file.txt your_file.txt.gpg