无法在linux中生成gpg密钥

我无法在 linux中生成GPG密钥
sudo gpg --gen-key      # This is the command to try to generate key

错误

You need a Passphrase to protect your secret key.

gpg: problem with the agent: Timeout        
gpg: Key generation canceled.

请告诉我我在哪里做错了

解决方法

请检查一下

1)运行gpg-agent命令:

gpg-agent --daemon --use-standard-socket --pinentry-program /usr/bin/pinentry-curses

2)生成足够的熵

sudo rngd -r /dev/urandom

3)最后运行gpg命令生成密钥:

gpg --gen-key

请仅使用非root用户运行所有命令

请使用相同的用户登录,该用户用于创建gpg密钥.

1.我们将导出我们的公钥和私钥如下:

user$gpg --export -a -o mypublickey.txt [email protected]
  user$gpg --export-secret-key -a -o myprivatekey.txt [email protected]
  user$ls my*

myprivatekey.txt mypublickey.txt

>使用相同用户导入密钥

User$gpg --import myprivatekey.txt

>现在尝试用同一个用户解密

相关文章

/etc/sysctl.conf这个目录主要是配置一些系统信息,/etc/sys...
1.作用 useradd或adduser命令用来建立用户帐号和创建用户的起...
它们都是多模式编辑器,不同的是vim 是vi的升级版本,它不仅...
不管是我们在安装软件还是监测软件的使用性能,我们都要随时...
装好Tomcat7后,发现除了本机能访问外界访问不了,岂有此理。...
修改防火墙配置需要修改 /etc/sysconfig/iptables 这个文件,...