File Password Protection

  • Post author:
  • Post category:CLI

How do I password protect / encrypt a file within Linux using OpenSSL ?

The file we will encrypt will be the file secretfile.txt.As you can see it is just a plain text file.

Encrypt File

Use the openssl comand to encrypt your file and then test the new file is fully encrypted.

$ openssl aes-256-cbc -salt -in secretfile.txt -out secretfile.txt.aes
enter aes-256-cbc encryption password:
Verifying – enter aes-256-cbc encryption password:

$ cat secretfile.txt.aes
binary data

Decrypt File

Decrypt the file and then confirm the decypted file is readable.

$ openssl aes-256-cbc -d -salt -in secretfile.txt.aes -out secretfile.txt
enter aes-256-cbc decryption password:

$ cat secretfile.txt
This is a secret file that we do not want anyone to read.

====================================== (more…)

Continue ReadingFile Password Protection


  • Post author:
  • Post category:Apps

From RetroShare is a Open Source cross-platform, private and secure decentralised communication platform. It lets you to securely chat and share files with your friends and family, using a…

Continue ReadingRetroShare


  • Post author:
  • Post category:CLI

From sl takes the most common use of Unix ls, to display the files in a directory compactly in multiple columns, and makes it substantially more useful. sl groups…

Continue Readingsl