Fix: SSH Timeout Issues

After recent upgrades to the medical school networks, we have seen issues related to SSH sessions being prematurely disconnected. This affects any SSH sessions that cross over to another subnet, which is almost always the case for our users. This affects Windows, Apple, and Linux users with connections between a desktop, server, or VPN.

If you find your SSH connections being terminated after a shorter than usual timeout period, or with an error similar to 'Write failed: Broken pipe', the instructions below may help.

SSH Sessions

This applies to any users on a Linux or Apple machine using SSH in a terminal session. You can set the global ServerAliveInterval parameter for your SSH sessions in two places:

  1. Edit your profile's ssh config file found here: ~/.ssh/config
  2. If you have administrator privileges, you can edit the system's ssh config file here: /etc/ssh/ssh_config
  3. Add this line: ServerAliveInterval 1000
  4. Save the config file, and restart the SSH service (or the desktop)

SecureCRT on Windows

Windows users can set this parameter in the SSH client application, SecureCRT. You can download SecureCRT from the UW Campus Software Library here.

  1. Open the SecureCRT application
  2. On the top menu, select 'Options', then 'Global Options..'
  3. In the 'Global Options' window, select 'Default Session' under the 'General' category on the left.
  4. Click on the 'Edit Default Settings...' button
  5. In the 'Session Options - Default' window, select the 'Terminal' category on the left
  6. Checkmark the 'Send protocol NO-OP' box under 'Anti-Idle'
  7. Enter '1000' in the seconds field then click on 'OK'
  8. Select 'Change ALL sessions (no undo)' if prompted
  9. Click on 'OK' again to close the 'Global Options' window
  10. Connect to your SSH session normally

SecureCRT Timeout Fix Screenshot