Enable rng-tools on VPS

PUBLISHED ON 09/01/2020 — SYSOPS

The problem with virtual servers is that some programs expect hardware support. One of them is the use of randomization with rng-tools.

We install the package:

sudo apt-get install rng-tools

But it will not start and log does a wonderful job with the explanation of the problem:

journalctl -xe
-- The job identifier is 2709090.
Jan 09 10:57:30 sablun.org rng-tools[30827]: Starting Hardware RNG entropy gatherer daemon: (Hardware RNG device inode not found)
Jan 09 10:57:30 sablun.org rng-tools[30827]: /etc/init.d/rng-tools: Cannot find a hardware RNG device to use.
Jan 09 10:57:30 sablun.org systemd[1]: rng-tools.service: Control process exited, code=exited, status=1/FAILURE

So to define the random device for rng-tools, we add/edit:

sudo echo "HRNGDEVICE=/dev/urandom" >> /etc/default/rng-tools

Restarting rng-tools service now works:

systemctl start rng-tools

See Also

TAGS: DEBIAN, HACK, LINUX, VPS