Connecting to the Yens

In this section you will log in to the Yens for the first time.

All you need is a terminal: the built-in Terminal app on macOS, or Git Bash on Windows.

If your login does not work, put up a red sticky rather than reading ahead. An account that was never provisioned is the one problem on this page you cannot solve on your own — flag it and an instructor will come to you.

New to the terminal, or lost partway through? Work through the command line walkthrough from our research computing course, at your own pace — pwd, ls, cd, and the difference between an absolute and a relative path. Nothing here depends on finishing it first.


Why Use a Server at All?

Your laptop is fine for writing code and running small tests. But research computing regularly runs into limits that a laptop cannot handle:

Situation What happens on a laptop What happens on the Yens
Dataset is 80 GB Out of memory, script crashes Loads fine — 250 GB–3 TB RAM per node
Analysis takes 12 hours Laptop sleeps, WiFi drops, run dies Job keeps running — always on, always connected
Need to run 100 jobs in parallel One at a time, ties up your machine Submit all 100 at once via the scheduler
Data is restricted (IRB, NDA) Must stay on Stanford systems Yens are Stanford-managed infrastructure
Collaborating with your PI “Can you send me the data?” PI already has access to /yen/projects/

The Yens are available to all researchers at GSB — faculty, PhD students, pre-docs, post-docs, and research staff alike. This section is where you start using them.

“My regression on the full sample took 14 hours. My laptop died at hour 6. I lost everything. Two days later I reran it on the Yens and went to sleep. It finished while I was gone.” — PhD Student


What Is a SUNet ID?

Your SUNet ID is your Stanford username — the part before @stanford.edu, not your full email address. It is how every Stanford system knows who you are, and on the Yens it is where your files live: your home directory is /home/users/SUNetID/ and your scratch space is /scratch/users/SUNetID/. It is also the username in every ssh command you are about to run. (It is not your GitHub username — that one comes up in the next section.)

Type your SUNet ID and every command on these pages fills itself in, so you can copy and paste them without editing. It stays in this browser.


What Are the Yens?

The Yens are a 17-node shared research computing cluster: 5 interactive nodes you connect to directly, and 12 nodes accessible only through the SLURM scheduler (Day 2). All 17 nodes share the same file system — a file you write on yen1 is instantly visible on every other node.

You’ll connect using the ssh command. ssh opens an encrypted tunnel: you type locally, commands execute remotely, output streams back to your screen.

Your laptop connects over SSH to the remote Yens cluster. You land on a shared interactive Yen for light work; the powerful SLURM compute nodes are reached later, on Day 2, through a scheduler. Every node shares the same storage. 💻 Your laptop where you type your commands connect with SSH ssh SUNetID@yen.stanford.edu ☁️ THE YENS CLUSTER · REMOTE, ALWAYS ON Interactive Yens — where you land today yen1 yen2 yen3 yen4 yen5 Shared compute for light work — per-user CPU & RAM limits enforced via the SLURM scheduler — Day 2 SLURM compute nodes — reached on Day 2 8 CPU + 4 GPU nodes (12 total) · only via sbatch / srun SHARED STORAGE · EVERY NODE SEES THE SAME FILES /home/users/SUNetID/ personal · backed up · limited /yen/projects/ project files & results · backed up · large /scratch/users/SUNetID/ large & fast · NOT backed up

The interactive Yens are shared — per-user CPU and RAM limits are enforced automatically. See the current limits for details. For heavier jobs, the SLURM scheduler (Day 2) gives you dedicated compute nodes.

What’s inside a Yen server:

Server hardware diagram showing CPU, cores, and RAM — Yen1 has 256 cores

The CPU is the processor chip. Cores are the individual workers inside it — each core runs instructions independently, which is what makes parallel work possible. RAM holds the data the CPU is actively using. The Yen servers vary in size — see the current specs on RCPedia for details.


Exercise — Log In

Log in to the Yens for the first time and get your bearings.

Connect to the Yens cluster over SSH, identify which interactive Yen you landed on, and read the login banner.

Connect:

ssh SUNetID@yen.stanford.edu

The username is your Stanford one — set your SUNet ID in the sidebar and every command on the site fills it in for you. When prompted for your password, type your Stanford password (nothing will appear — that’s normal). You will be prompted for Duo two-factor authentication.

Identify your node:

hostname      # e.g. yen1, yen2, yen3, yen4, or yen5
whoami        # confirm you are logged in as yourself

The Yens (yen1–yen5) are shared interactive compute servers. You land on whichever one the load balancer picks. They’re powerful, but shared — read the login banner when you connect, it describes current usage policies.

Read the banner, then look around:

ls ~                              # your home directory on the Yens
pwd                               # /home/users/SUNetID
ls /scratch/users/SUNetID         # your personal scratch — created for you automatically
ls /yen/projects/                 # shared project storage

Two keys that will save you the most typing.

  • ↑ — the up-arrow key walks back through commands you have already run, newest first. Recall one, edit it, and press Enter. Retyping a long path by hand is how typos get made.
  • Tab — start a file or directory name and press it; the shell finishes the name for you. Press it twice to list every match when more than one fits.

Tab is also the fastest way to check a path before you run something. If it refuses to complete, what you have typed so far doesn’t exist — a wrong directory caught in a keystroke instead of in an error message. Try it now: type ls /yen/pro and press Tab.

Both are features of the shell, not of the Yens, so they work the same in a terminal on your laptop.

🔴 Red sticky = I need help

Put one on your laptop lid if you are stuck and an instructor will come to you.


Bonus

Skip the repeated logins with SSH multiplexing

Every time you ssh to the Yens you re-enter your password and approve Duo again — tedious once you’re opening several sessions. SSH multiplexing keeps one authenticated connection open and reuses it for every later session to the same host, so you authenticate just once.

Set it up on your laptop (not the Yens) by adding this to ~/.ssh/config — create the file if it doesn’t exist:

Host yen yen? yen??
  HostName %h.stanford.edu

Host yen yen.stanford.edu yen? yen?? yen?.stanford.edu yen??.stanford.edu
  ControlMaster auto
  ControlPersist yes
  GSSAPIDelegateCredentials yes

Host *
  ControlPath ~/.ssh/%r@%h:%p

Then try it:

  1. Open your first connection as usual — ssh SUNetID@yen.stanford.edu — and authenticate with your password and Duo. This becomes the shared “master” connection.
  2. Leave it open, and in a second terminal run ssh SUNetID@yen.stanford.edu again. It connects instantly — no password, no Duo — because it’s reusing the first connection.

Full write-up: SSH Setup for the Yen Servers on RCpedia.


Page last modified: Sep 16, 2026.

Your details

Set these once and the commands on every page fill themselves in. Stored in this browser.

Built with Just the Docs.