Q:

terminal closing when ssh connection breaks

This is a new issue for me, where I have a terminal open, with ssh running.  But because I live in the backwoods of maine, my sessions frequently break.  
formerly, ssh would report, "Broken Pipe" and the terminal window would stay open.  That was great, because I could just look, and go ok, and log back in. 
Now, for some reason, the entire window closes.  This introduces, an extra step into something that was already obnoxious.   
I launch the sessions from mate panel, which in turn launches gnome-terminal
(why not mate- terminal?  Ive asked, and never got a serious answer)
and then launched the ssh connection.  I have to enter passwords.. just because. 
So, how can I make my terminal not close, even if ssh suffers from a broken pipe?  
Ubuntu Mate 16.04

A:

You need to open terminal first, then start a session from there. 
Obviously if you start a session this way, the terminal closes after the session is ended. 
You can set up the command to launch the terminal this way:
gnome-terminal -e "bash -c \"ssh root@192.168.1.1; exec bash\""

This way after the session ends, bash will stay. 
You can use another terminal instead of gnome-terminal.  And you can use sh instead of bash to load the default shell.