Skip to content

Instantly share code, notes, and snippets.

@xingjian-zhang
Last active November 15, 2023 20:09
Show Gist options
  • Save xingjian-zhang/a2257ed210dbdee23f748db5c916dc4d to your computer and use it in GitHub Desktop.
Save xingjian-zhang/a2257ed210dbdee23f748db5c916dc4d to your computer and use it in GitHub Desktop.
Setting up ControlMaster for GreatLakes

This gist shows how to get rid of authentication when connecting to Greatlakes by ssh.

Set up ~/.ssh/config

Add the following to ~/.ssh/config

Host greatlakes
  HostName greatlakes.arc-ts.umich.edu
  User jimmyzxj
  ControlMaster auto
  ControlPath ~/.ssh/%r@%h:%p

Start up background parent process

Run the following once and authenticate using password and DUO.

ssh -CX -o ServerAliveInterval=30 -fN greatlakes

All later login will be authentication-free.

ssh greatlakes

For example:

(base) jimmy in ~/.ssh λ ssh greatlakes
Last login: Wed Nov 15 15:00:30 2023 from 35.7.36.124
*                      Advanced Research Computing                           *
                         University of Michigan
                         arc-support@umich.edu

                         Welcome to Great Lakes

User documentation: http://arc.umich.edu/greatlakes/user-guide/
The folders under /scratch are intended for data that is in active
use only.  Please do not store data there for longer than 60 days.
For usage information, policies, and updates, please see:
https://arc.umich.edu/document/greatlakes-policies/
------------------------------------------------------------------------

(base) [jimmyzxj@gl-login1 ~]$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment