Configure SSH to send keep-alive packets to maintain a stable connection.
cd ~/.ssh/ nano config ServerAliveInterval 30 ServerAliveCountMax 36