On your own mac or linux machine configure your ssh keep the server ssh alive every 3 minutes. Open a terminal and go your your invisible .ssh in your home:
cd ~/.ssh/
then create a 1 line config file with:
echo "ServerAliveInterval 180" >> config
you should also add:
ServerAliveCountMax xxxx (high number)
the default is 3 so ServerAliveInterval 180 will stop sending after 69 minutes (3 of the 3-minute interval specified by ServerAliveInterval).