2

I need encrypt whole disk on Debian 7.5, (it will be work as server) but I need enter encryption password via SSH. So I need encrypt whole disk except primary system features as ssh server, because for example I need remotely restart this server. Do you know about any effective options?

1 Answer 1

2
  1. First step would be to decide what needs to be encrypted and what not. There is no need to encrypt a standard debian server release, its not like it contains any secrets. Create at least two partitions, one for the normal stuff and one for the sensitive stuff.
  2. Then you install the complete server as normal, without any sensitive data (on the normal partition).
  3. Disable autostarting for all services that need the sensitive data.
  4. Setup the encryption stuff, see if manual mounting and manual starting the servers work.
  5. Finally, to reduce work needed, create a script to automate that. For example name it /root/decrypt-and-start.sh

    #!/bin/sh # mount the encrypted filesystem # this will ask for a password mount-encrypted-file-system # start the services service apache2 start service foo start 
  6. You can no start this script with ssh root@server ./decrypt-and-start.sh, you will need to provide the root password (or use passwordless authentication) and the disk password.
4
  • What software, system feature would you use here to do the encyrpt/decryption. Truecrypt, sshfs? Commented May 21, 2014 at 20:00
  • I think dm-crypt will be the easiest. Please note: sshfs does not provide encryption of data, it can only be used to access data (in a secure way) that is stored on the server, but the server will need to store the data securely itself. TrueCrypt might be an option. Commented May 21, 2014 at 20:28
  • Thanks for reply. I am understand that ssh does not provide data encryption. I want only enter encryption password via SSH. So I will install Debian 7.5 and during this installation I will create one partition with mount point "/" What capacity is sufficient? And after I create small swap and encrypted partition with other disk space. And it will has mount point for example /root, (I will login as root) and Can I encrypt it during installation? After I will do on automatically script... Commented May 23, 2014 at 15:49
  • I am not aware of a complete disk encryption (including rootfs) that works over ssh for booting. Also you might not want to use an unencrypted swap. Certain directories should be available for booting, this includes /root, in particular if you want to connect via ssh. Commented May 23, 2014 at 15:52

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.