ash: encrypt files and directories in Linux in an easy way

Informatic security

It is possible to encrypt and decrypt files and directories in Linux in a simple way, although there are many projects and possible ways dedicated to this. We have already talked about LUKS, eCryptFS, and a multitude of other tools on other occasions. Now we will present a simple but effective tool to encrypt content from our team called ash. In addition to describing its installation and basic operation step by step in this mini-tutorial.

Why do I need to encrypt? Well the answer is simple, For securityIn this way, an unauthorized third party could not have access to the files and directories on our computer unless they know the password or passphrase to decrypt them (or there is some kind of vulnerability such as in MD4), or rather, it access the files but the only thing you could see is the encrypted content that is totally incomprehensible to a human instead of the plain text or any content that the encrypted file had ...

With ash we can encrypt our files and directories using encryption AES-CBC-256, that is to say, a fairly secure system. Specifically, ash is a modular framework for Bash written to be simple and to be used from the CLI. For your installation:

curl | sh

ash apm:install

Once installed, the following is get to work with him. It is as simple as typing the following in case you want to encrypt a file example.txt:

ash cipher:e ejemplo.txt

Will ask us encryption password and after that it will generate a file example.enc. That if we try to access it we will see that its content is a gibberish of nonsense alphanumeric symbols. To decrypt again, all you have to do is:

ash cipher:d ejemplo.enc

And we already have it as before ... For directories it is exactly the same, replacing example.txt or example.enc with directory_name / and directory_name.tar.gz.enc.

The content of the article adheres to our principles of editorial ethics. To report an error click here!.

Be the first to comment

Leave a Comment

Your email address will not be published.



  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.