Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

OpenSSH_6.7p1 Debian-5+deb8u2 unix socket forwarding: Warning: remote port forwarding failed for listen path /home/sithglan/.gnupg/S.gpg-agent

44 views
Skip to first unread message

Thomas Glanzmann

unread,
Jul 20, 2016, 5:12:48 AM7/20/16
to
Hello,
I would like to forward my gpg-agent from a local workstation using a
remote machine:

(x1) [~] ssh -o "StreamLocalBindUnlink=yes" -R /home/sithglan/.gnupg/S.gpg-agent:/home/sithglan/.gnupg/S.gpg-agent remote.machine.de

when I do the same, I get the following error message:

Warning: remote port forwarding failed for listen path /home/sithglan/.gnupg/S.gpg-agent

From my understanding StreamLocalBindUnlink=yes should delete the remote
listining socket before forwarding it. On the web other user report that
it is broken and someone should use a ~/.ssh/rc file to fight the
symptoms. My question is: Should it work like the above? Am I doing
something wrong? Is it fixed in a newer version and should I upgrade?

I'm using Debian Jessie 64 Bit, but fine with updating or patching sshd
to enable above usecase. Otherwise I'll go with the ~/.ssh/rc file.

Cheers,
Thomas
_______________________________________________
openssh-unix-dev mailing list
openssh-...@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev

Thomas Glanzmann

unread,
Jul 20, 2016, 7:31:52 AM7/20/16
to
Hello everyone,

> (x1) [~] ssh -o "StreamLocalBindUnlink=yes" -R /home/sithglan/.gnupg/S.gpg-agent:/home/sithglan/.gnupg/S.gpg-agent remote.machine.de
> Warning: remote port forwarding failed for listen path /home/sithglan/.gnupg/S.gpg-agent

to answer my own question. StreamLocalBindUnlink exists for client and
for server. In order to make a remote port forwarding work with an
existing socket, it needs to be enabled in the server, not in the
client. So the following works:

(infra) [~] grep StreamLocalBindUnlink /etc/ssh/sshd_config
StreamLocalBindUnlink yes
(infra) [~] /etc/init.d/ssh restart
Restarting OpenBSD Secure Shell server: sshd.

Afterwards it works like a charm.
0 new messages