Why restoring a large sql file via SSH seems to quit partially through the process
Either the problem is with MySQL connections being killed silently, in which case please set:

[mysqld]
net_read_timeout = 7200
net_write_timeout = 7200


Defaults are extremely low (30 seconds). These params set the number of seconds waiting upon a command before aborting a connection.

Or the problem is as you suggest with your SSH. In which case use screen. If you don't know about screen, you are missing on a major tool. In very brief, it splits your shell, and allows you to close the terminal without breaking ongoing processes. It allows you to re-connect at another time or place, share your connection with others, and more.