Bug 3027

Summary: The "Bad local forwarding specification" error only caused by socket filename longer than 103 characters
Product: Portable OpenSSH Reporter: vpithart
Component: sshAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED WONTFIX    
Severity: normal CC: djm
Priority: P5    
Version: 7.9p1   
Hardware: 68k   
OS: Mac OS X   

Description vpithart 2019-07-01 21:09:45 AEST
When using `ssh -L local_socket:remote_socket` according to manual, when the `remote_socket` filename length is 104+ characters, the "Bad local forwarding specification" error jumps out and SSH client does not work.

Example 1 (fail):
$ ssh -nNT -L /tmp/live:/var/lib/docker/overlay2/1c59b2ed03064cf516958d01354b81fadfa7ab625fac6c13bffe8bc52a29f9cd/merged/usr/local/nagios/var/rw/live root@example.com
Bad local forwarding specification '/tmp/live:/var/lib/docker/overlay2/1c59b2ed03064cf516958d01354b81fadfa7ab625fac6c13bffe8bc52a29f9cd/merged/usr/local/nagios/var/rw/live'


Example 2 (works):
$ ssh -nNT -L /tmp/l:/var/lib/docker/overlay2/1c59b2ed03064cf516958d01354b81fadfa7ab625fac6c13bffe8bc52a29f9cd/merged/usr/loc root@example.com
(works as expected)
Comment 1 Damien Miller 2019-07-01 21:35:21 AEST
That's a limitation of AF_UNIX sockets unfortunately - that's how much room is available in the kernel struct sockaddr_storage API and AFAIK it's impossible for ssh to increase it.
Comment 2 Damien Miller 2021-04-23 14:58:14 AEST
closing resolved bugs as of 8.6p1 release