How to prevent interuptions of ssh connections to DKRZ systems?#

If your ssh connections to login nodes are interrupted after short periods without any keyboard activitiy and you get an error message containing the string “broken pipe”, try to set the ServerAliveInterval parameter appropriately.

On Linux and macOS systems with the OpenSSH implementation there is essentially two methods to adjust this client setting. First, it can be set as a command-line option to ssh:

ssh -o ServerAliveInterval=60 -X userid@hostname.dkrz.de

In the example above, ssh will send a message with a response request to the server if no packets have been received from the server in the past 60 seconds.

The second, usually more convenient way, to always use the above setting is to add the following lines to the user’s configuration file for the ssh client, ~/.ssh/config on your local machine:

Host *.dkrz.de
     ServerAliveInterval 60

If the file ~/.ssh/config does not exist, you can simply create it with an editor of your choice. For further information on configuration files and parameters for the ssh client, please refer to the manual pages:

man ssh_config