Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ron-Lavi/6a15880cc98e9035d78f57b7b4c17a0b to your computer and use it in GitHub Desktop.
Save Ron-Lavi/6a15880cc98e9035d78f57b7b4c17a0b to your computer and use it in GitHub Desktop.
channel 1: open failed: administratively prohibited: open failed
The above message refers to your SSH server rejecting your SSH client's request to open a side channel. This typically comes from -D, -L or -w, as separate channels in the SSH stream are required to ferry the forwarded data across.
Since you are using -L (also applicable to -D), there are two options in question that are causing your SSH server to reject this request:
AllowTcpForwarding (as Steve Buzonas mentioned)
PermitOpen
These options can be found in /etc/ssh/sshd_config. You should ensure that:
AllowTCPForwarding is either not present, is commented out, or is set to yes
PermitOpen is either not present, is commented out, or is set to any[1]
Additionally, if you are using an SSH key to connect, you should check that the entry corresponding to your SSH key in ~/.ssh/authorized_keys does not have no-port-forwarding or permitopen statements[2].
Not relevant to your particular command, but somewhat relevant to this topic as well, is the PermitTunnel option if you're attempting to use the -w option.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment