我无法在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
现在尝试用同一用户解密
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句