13

I was doing this tutorial, but when it comes to the part where O should run these commands:

local-server#  ssh -NTCf -w 0:0 87.117.217.27
local-server#  ssh -NTCf -w 1:1 87.117.217.44

It says:

channel 0: open failed: administratively prohibited: open failed

How can I fix that?

Badr Oyd
  • 335

3 Answers3

21

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.

Lambert
  • 12,680
5

This can also happen if the (correctly configured) server has recently updated their kernel, but not yet rebooted.

user141456
  • 51
  • 1
  • 1
4

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.

dr_
  • 29,602
Jan
  • 41