运行gpg --gen-key生成密钥时卡住在We need to generate a lot of random bytes

在运行 gpg --gen-key 生成密钥时,按提示输入了完整的信息之后,一直卡住没成功,屏幕提示:

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.

通过提示可以知道,生成密钥的时候需要大量的随机信息,这个时候需要你不断地打字、移动鼠标、读写硬盘以让系统内核产生足够多的随机信息。

如果我们选择的密钥长度比较长,对系统的操作也不怎么活跃,就会需要很长的时间来完成,事实上光靠打字也是很难的。

解决办法是安装 rng-tools 这个工具,apt-get install rng-tools 或 yum install rng-tools 即可完成安装。

之后再执行命令:rngd -r /dev/urandom,生成密钥就能瞬间完成了。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值