Connect from macOS and Linux

Generating and Uploading an SSH Key Pair

A key pair is required to connect to a cluster. A key pair consists of a private key and a public key. The private key remains on your desktop/laptop and should never be shared with anyone. Your public key is installed in ~/.ssh/authorized_keys on the cluster. In order for someone to access your account on the cluster, they must possess your private key and its associated passphrase.

To generate a new key pair, first open a terminal/xterm session. If you are on macOS, open Applications -> Utilities -> Terminal.

Generate your public and private ssh keys. Type the following into the terminal window:


Your terminal should respond:

Generating public/private rsa key pair.
Enter file in which to save the key (/home/#yourusername#/.ssh/id_rsa):

Press Enter to accept the default value. Your terminal should respond:

Enter passphrase (empty for no passphrase):

Choose a secure passphrase. Your passphrase will prevent access to your account in the event your private key is stolen. The response will be:

Enter same passphrase again:

Enter the passphrase again. The key pair is generated and written to a directory called .ssh in your home directory. The public key is stored in ~/.ssh/

Next, install your public ssh key on the cluster. Run the following command in a terminal:

cat ~/.ssh/

Copy and paste the output to Yale HPC ssh key installer (only accessible on campus or through the Yale VPN). It may take up to 15 minutes after uploading for your key to be pushed to the clusters. Note that you should never send the private key file to anyone!

Logging into a Cluster

Once your public key has been installed, you may use ssh in a terminal to access the appropriate cluster. You need to know 2 things to log into a cluster.

  1. the hostname of the cluster login node
  2. your netid

You can find the hostnames of the cluster login nodes here. Open a terminal window and connect to the login node using the syntax:

ssh netid@login-node

For example, if your netid is ra359 and you wish to log into the Omega cluster:


Check out our Sample Linux/Mac SSH Configuration for tips on maintaining connections and adding tab complete to your ssh commands.

Change Your SSH Key Passphrase

Enter the following in a Terminal window and follow the prompts:

ssh-keygen -p

If you forget your passphrase, it cannot be recovered. Instead, you will need to generate and upload a new ssh key pair.