Okay, so I have CENTOS installed and realized that if I connect to the server via SSH but stay idle for a while, the connection closes on me. Well apparently there's a setting that solves this problem. Edit your /etc/ssh/sshd_config file
Now add the following to the end of the file:
KeepAlive yes ClientAliveInterval 30
Now save the file and either restart your sshd service or reboot
NOTE: PLEASE BE CAREFUL! EDITING THE SSHD_CONFIG FILE WRONGLY COULD LEAD TO LOGIN PROBLEMS. IN OTHER WORDS, IT CAN CAUSE YOU TO NOT HAVE ACCESS TO YOUR DATA SO DO IT CORRECTLY!