Exiting ssh when MaxSessions=0
Iain Morgan
imorgan at nas.nasa.gov
Sat Aug 30 10:32:09 EST 2008
Hi,
I've been experimenting with MaxSessions=0 in the sshd_config and have
encountered one unfortunate problem. Once the client authenticates to
the server, it ceases to respond to keyboard input.
At first glance, it looks like the client is in a hung state and does
not time out. If port forwarding was requested on the command-line and
the server accepts the request, that continues to work. But the tilde
escapes (and ^C) do not work. Apparently, you have to kill the session
from another terminal.
Once the session is killed, any buffered input is handled by the shell.
In cases where you know the server will have MaxSessions=0, this is not
a huge issue; you just have to remember to use the -f option. It is a
bit unfortunate if you forget to use -f.
It would be nice if ~. worked in this situation. I suppose ~C would also
be nice in order to add port forwardings after the fact. I'm not sure if
it would be problematic to add such support.
--
Iain Morgan
More information about the openssh-unix-dev
mailing list