SSH configuration for CARC systems

In addition setting up SSH keys, you can also modify your SSH configuration to minimize disconnect and login issues for CARC systems. Your SSH configuration is probably located at ~/.ssh/config, depending on your OS or SSH program.

Add something like the following to the configuration file:

Host *.usc.edu
  ServerAliveInterval 30
  ServerAliveCountMax 4
  ControlMaster auto
  ControlPath ~/.ssh/%r@%h:%p
  ControlPersist 300s

The ServerAlive options help avoid disconnects from CARC servers, such as from bad wifi connections. After an initial login, the ControlMaster options enable multiple sessions over a single connection to allow additional logins without having to enter a password and submit Duo 2FA again, like after a disconnect (up to 300s).

4 Likes