Thomas Glanzmann
2016-Jul-20 09:06 UTC
OpenSSH_6.7p1 Debian-5+deb8u2 unix socket forwarding: Warning: remote port forwarding failed for listen path /home/sithglan/.gnupg/S.gpg-agent
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 remotelistining 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
Thomas Glanzmann
2016-Jul-20 11:30 UTC
OpenSSH_6.7p1 Debian-5+deb8u2 unix socket forwarding: Warning: remote port forwarding failed for listen path /home/sithglan/.gnupg/S.gpg-agent
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-agentto 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. Cheers, Thomas