I have the following entry in my .ssh/config
file
Host AAA
User BBB
HostName CCC
ControlMaster auto
ControlPath ~/.ssh/%r@%h:%p
The above allows me to multiplex multiple ssh sessions through the same ssh connection without having to type in the password every time I need a new session (as long as the master connection remains open).
However, I have noticed that once I have a relatively high # of connections multiplexed (~7), I can't add more sessions to the same multiplexed connection, and I start get the following error:
> ssh -X AAA
mux_client_request_session: session request failed: Session open refused by peer
Password:
My questions:
Why am I getting this error? Is there a limit in the # of ssh sessions I can multiplex in the same connection? Can I change that limit? Would that be a bad idea?
Since the peer refused the connection, I'd start by looking at the logs on the system you are connecting to. See if sshd gives any errors. If not, increase the LogLevel and try again.
If you find a log message that isn't immediately obvious and searching for the phrase doesn't help, you can use grep on the source code. Error messages are frequently surrounded by sets of conditions - one (or some) of them weren't met, and that's why this message came up.
– Shawn J. Goff Oct 20 '11 at 03:03