Article 6QZ8M gpg-agent forwarding & elogind/pam

gpg-agent forwarding & elogind/pam

by
Thom1b
from LinuxQuestions.org on (#6QZ8M)
Hi,

I'd like to set up gpg-agent forwarding through ssh. I followed this doc.

local host: slackware64-current
remote host: slackware64-current

On my local user, I set up ~/.ssh/config like this:
Code:Host frink-gpg
Hostname <myhostname>
User root
RemoteForward /run/user/0/gnupg/S.gpg-agent /run/user/1000/gnupg/S.gpg-agent.extraOn the remote user I set ino-autostarti in /root/.gnupg/gpg-agent.conf to be sure no local agent is started.
On the remote sshd config, I set up iStreamLocalBindUnlink yesi then restart sshd.

But when I use ssh from my local user, I have this error:
Code:$ ssh frink-gpg
Warning: remote port forwarding failed for listen path /run/user/0/gnupg/S.gpg-agentOK, it's just a warning but I can't connect to gpg-agent so I can't use the secret key.

Logs in remote host:
Quote:
Sep 24 08:48:00 frink sshd-session[22881]: error: unix_listener: cannot bind to path /run/user/0/gnupg/S.gpg-agent: No such file or directory
I also use gpg-agent forwarding with a remote host on slackware64-15.0. The big difference is the iRemoteForwardi is i/root/.gnupg/S.gpg-agenti on slackware64-15.0. I have no issue in this case.

I think the issue comes from elogind and/or pam which don't populate $XDG_RUNTIME_DIR correctly at ssh connections. Do you know how can I fix that please?
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments