Uppsala Multidisciplinary Center for Advanced Computational Science

System News

Fix for broken SSH-connections to the UPPMAX Cloud

2017-12-04

If you regularly end up with broken SSH-connections ("broken pipe") to your virtual machine in the UPPMAX region, please use the SSH option ServerAliveInterval. See below for an example.

The SNIC Science Cloud (SSC) region at UPPMAX is located behind a firewall that breaks idle TCP-connections. If you regularly end up with broken connections, you can use the ServerAliveInterval <seconds> to tell the SSH client (running on your machine) to regularly send a "I am alive" message to the server. The firewall will not close the TCP-connection as long as the client and server communicates regularly.

In your .ssh directory (default location $HOME/.ssh) add the line ServerAliveInterval 60 to your config file .ssh/config (if you don't have a .ssh/config file you can create it).

As an example of a .ssh/config, this is mine, with the line to add in bold.

Host *
    ForwardAgent yes
    StrictHostKeyChecking no
    ServerAliveInterval 60


If you want the setting restricted to machines only in the UPPMAX region you can change the * into 130.238.28.*

If you have questions, feel free to visit https://cloud.snic.se or contact us for support at support@ssc.snic.se

Best regards,
Linus
SNIC-UPPMAX