Skip to end of metadata
Go to start of metadata


O2 cluster logins originating from outside of the HMS network require two-factor authentication.

Please see the Two Factor Authentication page for more information.

Once you have an O2 account, you can login to the O2 cluster and submit jobs. Please reference the "Quick Start" section below to get connected to the cluster. If you need further detail on how to connect, you can refer to the appropriate section based on your operating system.

If you do not currently have an O2 account and would like to request one, please see here for instructions.

Quick start

You can connect to O2 using ssh (secure shell) at the hostname: o2.hms.harvard.edu. If you're on Linux or Mac, you can use the native terminal application. If you're on Windows, you will need to install a program to connect to O2; we recommend MobaXterm. In either terminal or MobaXterm, type the following command:

ssh yourecommons@o2.hms.harvard.edu


where you substitute yourecommons for your actual eCommons ID in lowercase. You will be prompted to enter your eCommons password. Once you authenticate, you'll be on one of the O2 login servers. You should not run anything computationally intensive on the login servers. Submit an sbatch job or request an interactive session with srun to run such processes instead. Reference the Using Slurm Basic for further information on submitting jobs.

If you need to have X11 forwarding enabled, read this wiki page for further instructions.

Logging in on a Mac

Open the Terminal application (found through Applications > Utilities). Enter the ssh command with your eCommons in lowercase, and press enter. When prompted, enter your eCommons password. 

If you are logging on from outside the HMS network, then two-factor authentication via your HMS Duo profile is required. You can choose which method to authenticate by: 1 for push, 2, for phone, or 3 for codes send via SMS. In the screenshot below, Duo push was selected. If you want to bypass selecting a method each time you need to authenticate, then you can set DUO_PASSCODE by following these instructions.

After you have successfully authenticated, you will see a welcome message, and will be able to enter commands after the prompt. 

Logging in on Windows

To login to the O2 cluster if you have a computer running Windows, you can choose to either use MobaXterm or PuTTY. We recommend MobaXterm, as it has a larger available range of features.

Using MobaXterm

First, download and install MobaXterm for Windows: https://mobaxterm.mobatek.net/

Open the MobaXterm software and enter the ssh command with your eCommons in lowercase, and press enter. When prompted, enter your eCommons password. 

Note: To avoid consecutive DUO authentication while connected to O2, you should set SSH-browser type to None.

After you have authenticated, you will see a welcome message, and will be able to enter commands after the prompt.

Using PuTTY

To enable graphical forwarding, first download and install Xming (https://sourceforge.net/projects/xming/). Any time you want to use graphical forwarding, double click Xming (all this does is put an icon in your Windows toolbar) before opening PuTTY. 

Download and install PuTTY: https://www.putty.org/

Open the PuTTY software and enter the ssh command with your eCommons in lowercase@o2.hms.harvard.edu

If you need X11 support, on the left panel, select Connection->SSH->Auth-X11, click the check box for "Enable X11 forwarding". 

 Click button "Open". When prompted, enter your eCommons password.

After you have authenticated, you will see a welcome message, and will be able to enter commands after the prompt.

Troubleshooting logging into O2

Please do NOT send us or anyone else your password. Ever. We can assist you without knowing your password, and sharing accounts on the cluster is prohibited by Harvard security policy.

If you're having difficulty logging in to O2, make sure you're using your eCommons ID and eCommons password. Your eCommons ID must be in lowercase. If that does not resolve the problem, then try logging in to https://ecommons.med.harvard.edu. Contact the IT Service Desk (itservicedesk@hms.harvard.edu, or 617-432-2000) if you're unable to login to the eCommons website. Your eCommons may have been locked due to too many failed login attempts to the O2 cluster. Once you are able to login to eCommons, wait 1 hour and try logging in to O2 again. If you're still facing problems, then send in a ticket to us.


  • No labels