Channel 0: open failed: administratively prohibited: open failed
After discussing this in a chat and debugged the issue, it turned out that the required directive PermitTunnel yes
was not in place and active. After adding the directive to /etc/ssh/sshd_config
and reloading sshd by service sshd reload
this was resolved.
We added -v
to the ssh command to get some debugging information and from that we found:
debug1: forking to background
root@ubuntu:~# debug1: Entering interactive session.
debug1: Remote: Server has rejected tunnel device forwarding
channel 0: open failed: administratively prohibited: open failed
debug1: channel 0: free: tun, nchannels 1
The server actively rejected the tunnel request which pointed us to the right directive.
This can also happen if the (correctly configured) server has recently updated their kernel, but not yet rebooted.
Just found out that I had a space after the IP address in "HostName x.x.x.x{space_here}" and had this error too:
channel 0: open failed: administratively prohibited: open failed
However it could be seen in logs that there was something strange:
debug1: Executing proxy command: exec ssh -A some-jump -W x.x.x.x\302\240:22
as those \302\240 were quite suspicious.