Operating System: # cat /etc/redhat-release CentOS Linux release 7.4.1708 (Core) opening ssh tunnel to a socket on RHEL/Centos machine with root user doesn't work and result in the following error when trying to use the locally created socket: # ssh -nNT -L $(pwd)/docker.sock:/var/run/docker.sock root@35.184.111.96 channel 1: open failed: administratively prohibited: open failed channel 1: open failed: administratively prohibited: open failed Normal users works correctly, and doesn't cause this error. # rpm -qa | grep openssh-server openssh-server-7.4p1-13.el7_4.x86_64
There's nothing in ssh/sshd that disables unix domain socket forwarding for root. Could you please attach a debug log from the server of the failure? (sshd -ddd)
AFAIK, this is fixed in master, but not yet in RHEL7: https://github.com/openssh/openssh-portable/commit/5104586
close bugs that were resolved in OpenSSH 8.5 release cycle