avatar

ThalliMega's Blog

Home

WSL使用GPG进行SSH认证

配置

~/.gnupg/gpg-agent.conf

enable-ssh-support

~/.config/fish/config.fish

set -gx GPG_TTY $(tty)
gpg-connect-agent updatestartuptty /bye > /dev/null
set -gx SSH_AUTH_SOCK $(gpgconf --list-dirs agent-ssh-socket)

gpg-connect-agent

keyattr <keygrip> Use-for-ssh: -1

验证

ssh-add -L正常。