Teamviewer is a remote desktop solution comparable to VNC. However, a significant difference is that Teamviewer offers a central server which allows to traverse NAT and also control PCs that are usually not reachable from the outside.
From my experience, it is likely that the Teamviewer process running on the remote Linux host accidentally crashes, making it impossible to connect to the server anymore. If you still have SSH access to the machine, you can however restart Teamviewer with the following commands (don’t use root user to launch Teamviewer):
$ screen $ export DISPLAY=":0.0" $ teamviewer
Starting Teamviewer in a screen will make the process survive, even when you close the SSH connection.