GnuPG
gpg-agent
gpg-agent --daemon
gpgconf --kill all && gpgconf --launch gpg-agent
SSH 登录
- 开启 ssh 支持
echo enable-ssh-support >> ~/.gnupg/gpg-agent.conf
- 添加环境变量
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
export GPG_TTY=$(tty)
- 查看 keygrip
gpg --list-keys --with-keygrip
- 添加 sshcontrol
echo [keygrip] >> ~/.gnupg/sshcontrol
常见 Flags 解释
sec => 'SECret key'
ssb => 'Secret SuBkey'
pub => 'PUBlic key'
sub => 'public SUBkey'
PUBKEY_USAGE_SIG S key is good for signing
PUBKEY_USAGE_CERT C key is good for certifying other signatures
PUBKEY_USAGE_ENC E key is good for encryption
PUBKEY_USAGE_AUTH A key is good for authentication