I’ve kept stumbling again and again on this pesky situation where encryption is the key to keep data as a secret from prying eyes.
Question/Task:
I am new to part of encryption on Ubuntu .
Is there any way to encrypt files and folder with password from terminal ? without using truecrypt or cryptkeeper?
Answer:
You can encrypt and decrypt files with gpg
To encrypt a file
gpg -c file.to.encrypt
To decrypt a file
gpg file.to.encrypt.gpg
But gpg will not do entire directories. For entire directories you have several options, ecryptfs is popular.
# Install if ecryptfs-utils if needed
sudo apt-get install ecryptfs-utils
# Make an encrypted directory
ecryptfs-setup-private
That will make a directory “Private”. Any data you put into the directory Private
will automatically be encrypted when you log out and decrypted when you log in.
If you want a different behavior or a different directory …
mkdir ~/secret
chmod 700 ~/secret
sudo mount -t ecryptfs ~your_user/secret ~your_user/secret
Put your data into ~/secrte
To encrypt
sudo umount ~your_user/secret
To Decrypt
sudo mount ./secret ./secret -o key=passphrase,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_passthrough=no,ecryptfs_enable_filename_crypto=yes
Hint: make an alias for that second command.
Geeking around is fun after all…
This is not an ad-vocation by any means for TP-link branding, however a real life…
First of all we need to hit the kernel version on any Android device. You…
Use resolvectl status instead. It's like something deprecates and suddenly things get broken! In systemd…
Geeky question: This is what people and friends have tried: rsync -arv --exclude "/home/john/.ccache:/home/ben/build" /home/john…
You might encounter this error which appears to be very common on Debian based Distro's…
PS: This article is for only Kali Linux users, that too having a Broadcom Wireless…