Before you start
You need:-
The
clusters.sshorclusters.ssh.adminpermission in the organization that owns the cluster. A Kubernetes resource grant does not give SSH access. See Permissions. -
ORG_IDandCLUSTER_IDset 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 holdclusters.ssh accepts it. You do not
need to be a member of any organization to register it.
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: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:
user.login_shell in GET /me:
/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 grantedclusters.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:
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:
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
clusters.ssh and clusters.ssh.admin.
Connect
Read the connection details:~/.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
scptransfers - remote commands used by legacy
scpandrsync, when those programs are installed on the login node - local port forwarding to loopback addresses on the login node
-R), agent forwarding, X11 forwarding, and
passing environment variables. It cannot be used as a jump host to other machines.
Transfer files
Using thetraining entry in your SSH config:
Forward a local port
To reach a service listening on port 8888 on the login node: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.
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.
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.
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.