在现场服务器上粉碎数据

从现场专用服务器中清除所有数据的最佳方法是哪一种?

我没有物理访问,也没有任何带外远程pipe理function的服务器,只有SSH访问。

服务器正在运行Debian 6

更新

服务器有ext3分区。

从碎纸手册页:

CAUTION: Note that shred relies on a very important assumption: that the file system overwrites data in place. This is the traditional way to do things, but many modern file system designs do not satisfy this assumption. The following are examples of file systems on which shred is not effective, or is not guaranteed to be effective in all file sys- tem modes: * log-structured or journaled file systems, such as those supplied with AIX and Solaris (and JFS, ReiserFS, XFS, Ext3, etc.) * compressed file systems In the case of ext3 file systems, the above disclaimer applies (and shred is thus of limited effectiveness) only in data=journal mode, which journals file data in addition to just metadata. In both the data=ordered (default) and data=writeback modes, shred works as usual. Ext3 journaling modes can be changed by adding the data=something option to the mount options for a particular file system in the /etc/fstab file, as documented in the mount man page (man mount) 

如果由于某种原因,在系统正在运行的时候,您想要将整个磁盘碎化而不是仅仅是敏感数据,那么您唯一能够做到这一点的方法就是创build一个tmpfs(或其他ramdisk)挂载,实用程序,然后使用pivot_root将根文件系统移动到ramdisk,然后卸载该分区粉碎它根据Womble的答案在这里 。 其实这是一个挑战, 我试过一次,看看是否有可能 ,并能够得到几乎所有,但init从虚拟磁盘工作,但无法让init移动其控制pipe道( /dev/initctl ),所以我可以卸载分区。

或者,根据这个答案,你可以尝试closures所有可能试图写入日志文件的东西,杀死其他所有不必要的东西,使用lsof来查找打开文件的进程并杀死它们,然后尝试粉碎分区。 如果你幸运的话,在内核发现文件系统损坏和恐慌之前,这个过程将会完成。 如果你没有,内核会惊慌,碎片将停止,系统肯定无法启动,无法完成粉碎。

否则,如果你只需要将数据碎化,那么我认为如果日志设置为data=ordered或每个shred的联机帮助页的writeback ,则可以合理确信这样做,然后将现有的数据文件(如果未设置为受支持的模式,它看起来像改变它需要重新启动)。 要碎片数据文件可能曾经存在的未分配的空间,使用dd填充驱动器与大文件,然后粉碎这些以及。 请注意,此选项可能会保留各种元数据(包括文件名,所有权,文件大小等的目录条目)。 dd进程将需要以root用户身份运行,以保证填满驱动器,因为(默认情况下)为root用户保留的空间不能由普通用户填充。 您可能希望在此期间停止日志logging(或者login到单独的分区或tmpfs),因为一旦驱动器完全满了,就会出现问题。

假定服务器使用旋转磁盘,请尝试shred命令。

shred和srm是可以用来安全删除数据的两个命令。 阅读他们的手册页获取更多信息。

安全和安全:获取encryption数据的安全和安全的硬盘。

然后指示光盘销毁密钥并制作一个新密钥。

毫秒安全删除。

这是目前大多数SAS光盘的标准选项。