strange ssh problem: "open failed: administratively prohibited:"

It sounds like you're running into the SSH server's limit on the number of simultaneous sessions per connection. Your command-line session to the remote server is one session, and each individual forwarded TCP connection is another session.

You can change the server's limit through the MaxSessions parameter in the server's sshd_config file:

MaxSessions
Specifies the maximum number of open sessions permitted per network connection. The default is 10.

You'd update sshd_config like this:

  1. Find the file. It's usually /etc/ssh/sshd_config.
  2. Edit it as root.
  3. In the file look for an existing MaxSessions setting if any. Otherwise, add a new line. Set the number to 15 or so. Save the new file.
  4. Restart sshd to make it reread the file.
  5. Make a new ssh connection and see if the behavior changes.

Tags:

Ssh