Poke AWS in terminal

My terminal always automatically closes the session whenever I log in to the AWS EC2 instance and stay idle for a few minutes.

Adding ServerAliveInterval 50 in ~/.ssh/config solves this issue because it tells my terminal to poke AWS server every 50 seconds.