Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We want to set up a Linux server (hosting Git or later SVN repositories) which should have all stored data strongly encrypted, so that if one steals the server the data cannot be read. For example, our notebooks have all important data stored on a "true-crypted" partition.

We plan to access it with SSH private keys and only after successful login should the data be readable. The server would be located in our office, shut down at night and not be connected to the Internet directly, but only accessible in our intranet.

What suggestions do you have? I'm only a sporadic Linux user and hence not very competent at it.

share|improve this question
Also see this related question: – sleske Jun 10 '11 at 10:44
up vote 5 down vote accepted

If you cannot trust the location your machine is placed in, you can never consider your data as fully save.

A common setup to minimize the risk of data loss is to encrypt disk partitions / logical volumes that contain sensitive data. This protects you from

  • someone removing the harddrive, placing it into another machine and reading the data
  • someone rebooting your machine into a different system and accessing your data from there.

However, during runtime your system will have to know how to decrypt the data when someone with authorization wants to read it. Hence, after (re)boot you will have to enter the passphrase used to encrypt the data, after that the private key for de/encryption will be kept in memory. Hence, encryption

  • does not enhance security against attackers abusing weaknesses in your software (svn server, webserver, etc) or system (anyone who can gain root permissions on your system can access your data and also make a copy of your private key in memory)
  • does not protect you against more sophisticated measures to get access to your data. For instance, RAM does not instantly lose all the data when computer is turned off or the power is cut. It has been proven that one can delay that process by cooling down the ram to gain enough time to read the RAM (and hence gain access to encrypted data when one has physical access to the machine).

However, one has to evaluate how realistic such a scenario is. As I said, if you mistrust the location / people handling your hardware, you are always at risk. If the hardware itself is even provided by that people (rented hardware in a datacenter) there is even the additional risk that your hardware has been modified to gain access to your data - for instance the personal has access to your RAM state even without turning of your computer and deep freezing the RAM.

If you want want to increase your data security level and can live with the disks of the scenarios sketched out above you probably want to use disk encryption. Its a popular thing to do with data placed in a data center. To realize this on your linux system you want to look into

  • dmcrypt - a cryptography kernel module that ships with every modern linux and in particular
  • LUKS - an easy way to use it.
share|improve this answer
Thanks for the answer. The server will only run if we are in the office. We also don't assume the risk that someone comes and changes something in the hardware - we only want to protect the data against stealing the machine. – Mike L. Jun 10 '11 at 7:28
When the server is turned off, encryption will provide a very high level of security if applied correctly. So something like LUKS is probably exactly what you want. – barbaz Jun 10 '11 at 12:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .