Close menu Resources for... William & Mary
W&M menu close William & Mary

Connecting to HPC via Mac

Connecting directly to HPC clusters from on-campus (main or VIMS) via Mac

On a Mac, ssh commands within the terminal program can be used to connect to main- or VIMS campus HPC front-end hosts (such as bora.sciclone.wm.edu or james.hpc.vims.edu).  Using ssh to connect to an HPC cluster front-end consists of one command:

ssh <username>@<hostname>

Note that <username> can be omitted if it matches your local computer username. It will be explicitly included in all examples.   For almost all HPC users, your <username> is your W&M username.  Here is an example with <username> = ejwalt making an ssh connection to the HPC front-end with <hostname> = bora.sciclone.wm.edu :

m1.pngThis is now a command-line session on bora.sciclone.wm.edu. 

Connecting directly to HPC clusters from on-campus (main or VIMS) via Mac with X11 forwarding: 

To use graphics on MacOS from the HPC cluster, you will not only need to pass -Y, but you also need to install XQuartz on your Mac so the terminal has the ability to forward graphics from HPC to your Mac.

Once this is done and XQuartz should start automatically once an X program is launched from your terminal.   To log on to the bora.sciclone.wm.edu front-end from on-campus and allow X11 forwarding, the command is:

ssh -Y <username>@<hostname>

Here is an example with the -Y passed along, note that the session is able to launch the program xterm from bora which opens a new terminal on my local computer (the white window):

m2.pngThis is now an X11 capable command-line session on bora.sciclone.wm.edu. 

Connecting directly to HPC clusters from off-campus via Mac through the IT bastion host: 

To ssh through the IT bastion host to a HPC cluster front-end server, you must simply add -J <username>@bastion.wm.edu to the previous ssh command: 

If you do not have an ssh key added to the bastion host (see https://code.wm.edu/IT/bastion-host-instructions for more information), you will need to authenticate via DUO after entering your W&M password.  Once this is complete, you will then need to enter your W&M password again to log into bora.sciclone.wm.edu.   In this case, the command is:

ssh -J <WM username>@bastion.wm.edu <username>@<hostname>

m3.pngThis is now a command-line on bora.sciclone.wm.edu that connected through the bastion host.  

Connecting directly to HPC clusters from off-campus via Linux through the IT bastion host with X11 forwarding: 

To use graphics on MacOS from the HPC cluster, you will not only need to pass -Y, but you also need to install XQuartz on your Mac so the terminal has the ability to forward graphics from HPC to your Mac: 

Once this is done and XQuartz should start automatically once an X program is launched from your terminal.   To log on to the bora.sciclone.wm.edu front-end from on-campus and allow X11 forwarding, the command is:

 ssh -Y -J <WM username>@bastion.wm.edu <username>@<hostname>

m4.pngThe is now an X11 capable command-line session on bora.sciclone.wm.edu connecting through the bastion host.