PROBLEM:
I have an AWS EC2 Ubuntu 16.04 machine set up to change IP every 5 minutes. I need to work via SSH on it, but this is obviously hard as the terminal console freezes and then I have to reconnect by typing the new IP. An alternative I tested already is to use noip.com, with a dynamic DNS, but the console still freezes and I normally need to wait for a couple of minutes until the DNS propagates.
QUESTION:
Do you know any possible option to solve this problem? I want to keep my SSH session alive despite the frequent IP changes.