You can configure the ssh client to automatically send a protocol no-op code code every so many seconds so that the server won’t disconnect you. This is setting is sometimes referred to as Keep-Alive.
Securing OpenSSH
OpenSSH (or Secure SHell) has become a de facto standard for remote access replacing the telnet protocol. However, a default installation of ssh isn’t perfect, and when running an ssh server there are a few simple steps that can dramatically harden an installation.