I'm using PuTTY to connect to a remote Ubuntu server hosted on AWS. Every now and then the connection completely freezes and nothing I do makes it respond. It comes back by itself after a few minutes and then tries to apply all the gibberish I typed while trying to get it to respond.
Is there a way to avoid these freezes/minutes long lags and if not, is there a way know when it's happening, vs the keystrokes are reaching the server but have no effect in the current context?