问题原文
原帖链接 · redic · CC BY-SA 3.0
I'm logged onto a VM remotely and trying to generate a 4096bit PGP key, it just hangs forever because there is no entropy and since I'm working through remote desktop it probably does not detect the mouse movement as entropy.
How can I generate some?
I tried cat /dev/urandom > /dev/null but that doesn't help.
社区高分解答
原帖链接 · Huygens · CC BY-SA 3.0
I would recommend to generate your gpg keys on your local machine which will have much better randomness than the remote one. And then migrate the keys using SSH to your remote machine.
Generating locally will be faster (more source for entropy), more secure (no one can spy on the process if your machine is not infected, better randomness).
If you still want to generate those remotely: On Linux you can generate more entropy by simply pinging a host (e.g. ping 8.8.8.8) if you own another network host try to have pings every 100ms (if your RTT is <100ms of course ). And/or use find to look for files on your hard disk and flush the RAM cache between each file search.
You could also installed haveged but read the limitations if you are running it in a virtual environment: https://wiki.archlinux.org/index.php/Haveged#Virtual_machines
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
