您可以使用eCryptfs来执行此操作。
不过,您需要以 root 用户身份执行此操作。以下是一些可行的说明:
root@server-59314:~# ecryptfs-setup-private
Enter your login passphrase:
Enter your mount passphrase [leave blank to generate one]:
************************************************************************
YOU SHOULD RECORD YOUR MOUNT PASSPHRASE AND STORE IT IN A SAFE LOCATION.
ecryptfs-unwrap-passphrase ~/.ecryptfs/wrapped-passphrase
THIS WILL BE REQUIRED IF YOU NEED TO RECOVER YOUR DATA AT A LATER TIME.
************************************************************************
Done configuring.
Testing mount/write/umount/read...
Inserted auth tok with sig [37d1d7fcf453d9d0] into the user session keyring
Inserted auth tok with sig [974bb07127cbe922] into the user session keyring
Inserted auth tok with sig [37d1d7fcf453d9d0] into the user session keyring
Inserted auth tok with sig [974bb07127cbe922] into the user session keyring
Testing succeeded.
Logout, and log back in to begin using your encrypted directory.
Run Code Online (Sandbox Code Playgroud)
然后你需要以 root 身份登录,并运行ecryptfs-mount-private。请注意,您可能希望确保在 root 注销时不会卸载 /var/www。要做到这一点,只需rm -f /root/.ecryptfs/auto-umount.
完全披露:我是 eCryptfs 项目的维护者之一。
请参阅http://ubuntuforums.org/showthread.php?t=1655933
但是,由于密钥在启动时解锁,除非有人进入您的服务器大厅,移除您的磁盘,然后尝试访问它,而无需测试将磁盘放入任何其他计算机(相同的架构)并尝试启动它。
您可能可以进行全盘加密(坏主意,因为您无法通过 SSH 解密您的计算机),或者您必须解锁加密,但最终您得到的服务器无法重新启动,无需担心事后维护。
| 归档时间: |
|
| 查看次数: |
4730 次 |
| 最近记录: |