I noticed that sometimes even if I would scp files from server to server, the connection would eventually timeout as soon as I logged out of the machine.
One solution is to use the excellent application ‘screen’. This allows you to multiplex more than one virtual console, keeping the terminal alive even if you are disconnected on your connection.
To create a screen, simply run:
screen -R "some_terminal_name"
When you want to return to the original window, you can hold CTRL+A+D. That takes you back to your original terminal. IF you want to return to the screen again, use the same command as mentioned above.