Skip to main content
On a Slurm cluster you work on a login node: you submit jobs, edit files, and read job output there. You reach it through the Andromeda SSH gateway, with a key you register once. SSH is available on clusters that run Slurm. A cluster that runs Kubernetes only has no login node; use kubectl instead. Inside a Slurm cluster diagrams the gateway, the login node, and the compute nodes.

Before you start

You need:
  • The clusters.ssh or clusters.ssh.admin permission in the organization that owns the cluster. A Kubernetes resource grant does not give SSH access. See Permissions.
  • ORG_ID and CLUSTER_ID set as in the quickstart.
  • An Ed25519 SSH key. Other key types are refused. To create one:

Register your key

Register a key once, and every cluster in every organization where you hold clusters.ssh accepts it. You do not need to be a member of any organization to register it.
The fingerprint should match ssh-keygen -lf ~/.ssh/id_ed25519.pub. The deprecated POST /organizations/{orgID}/ssh-keys route does the same thing; use POST /me/ssh-keys. A key can be registered once across all of Andromeda. Registering the same key again, with a new idempotency key, returns 409 with code invalid_state. You can register more than one key. In the console, SSH keys in the organization settings lists your keys, with when each was added or revoked, and lets you register or revoke one and choose your shell. You do not need a running cluster. A Slurm cluster’s Manage SSH settings shows the same controls next to the connection details.

List and revoke keys

List your keys, including revoked ones. You do not need to be a member of any organization:
Revoke a key you no longer trust:
Revocation is permanent and applies in every organization at once. Revoking a key that is already revoked succeeds and changes nothing. A revoked key cannot be registered again; create a new key instead. The gateway closes sessions and forwarded connections that used the revoked key within seconds of the cluster applying the change. Until ssh-access confirms the new key-set generation, treat the key as still usable. See Wait for access.

Choose your login shell

Your login shell is /bin/bash unless you choose another. You can choose any absolute path, such as /bin/zsh or /usr/bin/fish. It applies on every cluster where you can log in, in every organization:
Read the current choice from user.login_shell in GET /me:
Your username, uid, gid, and home directory do not change. Changing your shell restarts no nodes and does not close open sessions. Your next session uses the new shell once the cluster has applied it. If the shell is missing or not executable on the login node, the session prints a warning and falls back to /bin/bash; if Bash is also missing, the session fails. The shell applies only to SSH sessions through the gateway, so compute nodes do not need it installed.

Wait for access

Registering or revoking a key, changing your shell, or being granted clusters.ssh starts an access update on the clusters where you can log in. The update is applied asynchronously, and new logins can fail until it is. Open sessions continue while their user and key stay authorized and their login node keeps running. Poll the connection details until ready is true:
While access is not ready the endpoint still returns 200, with ready: false and a reason; see ready stays false. ready: true can still describe an earlier change. To confirm that a particular key or shell change has reached the cluster, compare what the cluster reports with what Business holds:
The change has reached the cluster when observation_current is true, ssh_key_set_generation equals the Business generation, and shell matches. Compare ssh_key_set_generation, not manifest_generation, which counts versions of the whole cluster’s access list. After you revoke your last key, ready stays false with reason: no_keys; use the same check to confirm the revocation. ready turns true once the login nodes and the Slurm controller have your account; it does not wait for compute nodes to restart or for your Slurm accounting association to be created (see Access changes restart nodes). Right after you are granted access, SSH can work while srun and batch jobs still fail. If they do, wait for the compute nodes and accounting to catch up and try again.

Access changes restart nodes

Nodes read the list of users once, when they start. To change that list, the cluster restarts its login nodes, Slurm controller, and accounting service, and then its compute nodes one at a time. The list changes when:
  • a person with an active key gains SSH access, or loses their last grant of it
  • a person with SSH access registers their first active key, or revokes their last one
The gateway reads keys and shells directly, so other changes restart no nodes: adding or revoking a key while you keep another active one, changing your login shell, or moving between clusters.ssh and clusters.ssh.admin.
A compute node does not wait for its running jobs before it restarts. Slurm marks the node down, and jobs running on it end. Make access changes when the cluster is idle, or be ready to resubmit jobs. Open SSH sessions on a restarting login node also close.

Connect

Read the connection details:
Your SSH login name is the cluster ID and your username, joined by a dot. This is how the gateway knows which cluster you want:
Trust the gateway’s host key before the first connection, so SSH does not prompt you for it:
Then connect:
One gateway serves many clusters, so its host key identifies the gateway, not your cluster. Every cluster on the same gateway shows the same key. To connect with a short name, add an entry to ~/.ssh/config:

What the gateway supports

The SSH gateway runs your session on the login node. It supports:
  • interactive shells, with terminal resizing
  • running a command, ssh training 'squeue --me', which returns the command’s exit status
  • piping data through standard input and output
  • SFTP, including modern scp transfers
  • remote commands used by legacy scp and rsync, when those programs are installed on the login node
  • local port forwarding to loopback addresses on the login node
It refuses forwarding to non-loopback destinations, remote forwarding (-R), agent forwarding, X11 forwarding, and passing environment variables. It cannot be used as a jump host to other machines.

Transfer files

Using the training entry in your SSH config:
You can also pipe files through a command:
For code, cloning the repository on the login node is usually simpler.

Forward a local port

To reach a service listening on port 8888 on the login node:
Open http://localhost:8888 on your computer. The destination is the login node, not a compute node. Accepted destinations are localhost and loopback IP addresses. Forwarded connections close if the SSH connection ends or its key or access is revoked.

Sessions end without warning

The gateway closes your SSH session when any of these happen:
  • The login node your session runs on restarts. That happens for a change to the user list (see Access changes restart nodes) and for some configuration changes, including the Slurm configuration.
  • Your access is revoked, or the key the session used is revoked.
  • The gateway cannot confirm your access.
Another member adding or revoking a key, when that does not change the user list, does not close your session. It does not wait for commands in the session to finish. Submit long-running work as a Slurm batch job with sbatch: the job runs on compute nodes and keeps running after you disconnect. A foreground srun, or a process left running on the login node, can end with the session.

Login modes

login_mode says how the cluster runs login nodes: If the cluster has shared storage, your home directory is on it in both modes, so it survives login nodes being replaced. See Files and storage.

Files and storage

Ceph or NFS can back the shared filesystem. To see which one a cluster uses and its capacity, read cluster options or GET /organizations/{orgId}/storage. Slurm’s shared volume requests 100 GiB by default, which is not the same as the cluster’s purchased capacity. A cluster without shared storage gives each node its own /home. Files there are not shared with compute nodes and do not survive the node being replaced.
Storage capacity can grow but cannot shrink, and deleting files does not reduce it. See Increase storage capacity.

Run something

Your default Slurm account is set for you. Unless your organization has changed the partitions, all is the default partition and contains every node, and each GPU type has its own partition, such as compute-h200. Each compute node has 8 GPUs.
For work longer than a few minutes, use sbatch. The nanoGPT speedrun example is a complete batch job.

Troubleshooting

ready stays false

reason says why: If access_not_projected or projection_pending lasts more than ten minutes, look for yourself in the access view. Until your entry has allocation, the cluster has not accepted an access list that includes you. If it has one and ready still stays false, contact Andromeda Support with the cluster ID.

Reference