My ssh connection drops after [n] minutes

Try adding the ServerAliveInterval and ServerAliveCountMax
variables to your ~/.ssh/config file on your computer.

This will tell the server that your connection is still alive and being used, and it will also keep proxy or NAT machines from closing an (apparently) unused TCP connection.

Example:

host=hoffman2
hostname=hoffman2.idre.ucla.edu
#user=your_user_name
ServerAliveInterval=30
ServerAliveCountMax=5