Last Updated: February 25, 2016
· supersymmetry

Open SSH connection freeze

When you decide to start out with your first VPS, as they become cheaper every day, chances are you will connect for the first time and find your shell "freezing" after a bit of time - being rendered unable for use. This problem could have a few causes but in my experience it's most often solved by creating a config file in your personal SSH user directory:


Touch (if not existent) and/or open with your favorite text editor. Next ensure the following lines are present:

ServerAliveCountMax 3
ServerAliveInterval 10

You should check if the correct permissions are applied, usually this is the case when you create the file under your own name. In any case you can apply them in octal-notation using the chmod command:

chmod 644 ~/.ssh/config

Hopefully your connection won't freeze anymore.