Linux

GPG 沒有足夠的熵

  • August 2, 2021

我在後台執行了大量程序來嘗試獲得足夠的熵,但我仍然失敗了。

**We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
Not enough random bytes available.  Please do some other work to give
the OS a chance to collect more entropy! (Need 210 more bytes)**

我需要一種方法來生成有效的密鑰,因為我正在嘗試做的事情顯然失敗了。

你看過RNG嗎?

Fedora/Rh/Centos 類型:sudo yum install rng-tools

在 deb 類型上:sudo apt-get install rng-tools設置它。

然後sudo rngd -r /dev/urandom在生成密鑰之前執行。

參考:http: //it.toolbox.com/blogs/lim/how-to-generate-enough-entropy-for-gpg-key-generation-process-on-fedora-linux-38022

我能夠通過

apt-get install rng-tools

在另一個 SSH 視窗中打開

gpg --gen-key

返回您的第一個 SSH 會話並執行

sudo rngd -r /dev/urandom

讓它執行直到 gpg 生成你的密鑰!

引用自:https://serverfault.com/questions/214605