I'm trying to use the private key from my openpgp card from my Debian laptop to a RPi. I followed the different hints found on google, in particular:
- extra-socket in
~/.gnupg/gpg-agent.conf
- removed it again when founding that this extra socket already will be created in
/run/user/<uid>/gnupg
- forward this socket using
~/.ssh/config
Host homegear
HostName homegear
RemoteForward ~/.gnupg/S.gpg-agent /run/user/1000/gnupg/S.gpg-agent.extra
- changed the order of the both sockets in the RemoteForward line since I'm always confused which one should be the first one
- add the following into
/etc/ssh/sshd_config
of the RPi
StreamLocalBindUnlink yes
- reload the gpg-agent on the laptop
- open new ssh connection to RPi
But I always get
Warning: remote port forwarding failed for listen path ~/.gnupg/S.gpg-agent
when connecting to the RPi.
openssh
on both laptop and RPi is 7.4 (Debian Stretch), gpg
is 2.1.18.
Forwarding the agent connect to be used as ssh private key (for connecting to gitlab from RPi) works perfectly, forwarding gpg private key (for signing commits) doesn't. I'm a bit helpless at the moment. Is there anything obviously wrong? Or is there still a problem with forwarding unix domain socket and I need to use the socat workaround?
Thank you!