Failed to use GPG key for SSH

Caleb Herbert csh at bluehome.net
Wed Jul 12 05:28:36 CEST 2023


I've followed the guide at
https://opensource.com/article/19/4/gpg-subkeys-ssh before, with
success. But lately, I haven't been able to use SSH.

I'll try to provide enough info below.

OS: Fedora Silverblue 38

[caleb at farnsworth ~]$ gpg --list-secret-keys 
/var/home/caleb/.gnupg/pubring.kbx
----------------------------------
sec#  rsa3072 2023-06-29 [SC]
      631CC434A56B5CBDFF21234697643795FA3E4BCE
uid           [ultimate] Caleb Herbert <csh at bluehome.net>
ssb#  rsa3072 2023-06-29 [E]
ssb#  rsa2048 2023-06-29 [A]

[caleb at farnsworth ~]$ ls -la ~/.gnupg/
total 76
drwx------. 1 caleb caleb   230 Jul 11 21:59 .
drwx------. 1 caleb caleb   378 Jul 11 19:55 ..
drw-------. 1 caleb caleb    14 Jul  9 02:26 crls.d
-rw-------. 1 caleb caleb    19 Jul  8 22:00 gpg-agent.conf
drw-------. 1 caleb caleb    88 Jul  8 22:00 openpgp-revocs.d
drw-------. 1 caleb caleb   264 Jul  8 22:00 private-keys-v1.d
-rw-------. 1 caleb caleb  6498 Jul  9 00:37 pubring.kbx
-rw-------. 1 caleb caleb  2718 Jul  8 22:00 pubring.kbx~
-rw-------. 1 caleb caleb   600 Jul 11 19:46 random_seed
-rw-------. 1 caleb caleb   758 Jul 11 21:59 sshcontrol
-rw-------. 1 caleb caleb 49152 Jul  8 22:00 tofu.db
-rw-------. 1 caleb caleb  1280 Jul  8 22:00 trustdb.gpg

[caleb at farnsworth ~]$ cat .gnupg/gpg-agent.conf 
enable-ssh-support

[caleb at farnsworth ~]$ tail .bashrc 
		if [ -f "$rc" ]; then
			. "$rc"
		fi
	done
fi

unset rc

export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
gpgconf --launch gpg-agent

[caleb at farnsworth ~]$ export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-
ssh-socket)
[caleb at farnsworth ~]$ gpgconf --launch gpg-agent
[caleb at farnsworth ~]$ ssh-add -L
The agent has no identities.

-- 
Caleb Herbert
https://bluehome.net/csh/




More information about the Gnupg-users mailing list