Things change over time. The latest question I found on this topic was from 2014 and appears to refer to 14.04. We are running 18.04 server. What is the current way to setup swap encryption? Is the preferred process still the same?
The requirements are, on boot clear swap, create a key and enable encryption of swap. On shutdown/reboot, forget key.
The documentation I am being pointed to is for desktop/laptops and is focused on hibernation and forces you to provide a password on boot and so is not a suitable option for servers.
In the comments below I have had suggested:
- ecryptfs-setup-swap
- cryptsetup
If we add other currently unknown options to this list, which is the preferred method? I expect this server to last ~5 years. Is one better than another? How?