When MaxSessions=0 is set in the sshd_config, client connections hang. Port forwardings requested on the ssh command-line still work, assuming the server allows them, but the client is unresponsive to any keyborad input. Neither ~. nor ^C will close the session. Based on comments from Damien, the solution may be to to replace a call to channel_free() with chan_mark_dead() in channels.c.
Created attachment 1586 [details] call cleanup handlers on channel open failures This patch changes the way that we clean up on receipt of an open failure message so that we run the callbacks that are needed for ssh to notice that its session channel has gone away.
put this on the list for 5.2
patch applied - this will be in openssh-5.2. Thanks!
Close bugs fixed/reviewed for openssh-5.2 release