/af-cern-lxplus:lxplus-accessfrom af-cern-lxplus
Diagnoses and fixes SSH access issues with CERN lxplus/cmslpc nodes: Kerberos/GSSAPI auth, 2FA via lxtunnel, node pinning, /tmp persistence, background process survival, AFS quotas, and Apptainer/EOS visibility.
Ships in af-cern-lxplus. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Agents reach lxplus through non-interactive ssh, and most failures come
from four facts: Kerberos tickets expire, lxplus is a round-robin alias
with node-local /tmp, lxplus9 kills background processes at logout, and
AFS areas are small. This skill collects what broke in practice and the fix.
Read it before any ssh-driven work on CERN (or FNAL) login nodes; for batch
jobs continue with lxplus-htcondor, for storage with eos-xrootd.
Field notes collected by DickyChant from about 25 Claude Code sessions running CMS work at CERN (Oct–Nov 2026). Every item was hit in practice; where sessions disagreed, both observations are kept.
ssh -T -o BatchMode=yes -o PreferredAuthentications=gssapi-with-mic -o GSSAPIDelegateCredentials=yes <user>@lxplus.cern.ch, after kinit <user>@CERN.CH on the local machine. Wrap every ssh in timeout, so it fails fast instead of hanging on a prompt.lxtunnel.cern.ch (ssh -J) with GSSAPI and a ControlMaster on the jump alias only. Check that the master is alive with ssh -O check <jump>. An agent can't answer 2FA, so if the master is down the user opens it.
-v shows Authenticated using "gssapi-with-mic" with partial success, then Permission denied (publickey,keyboard-interactive): Kerberos was accepted, the second factor is missing.ssh -fN lxtunnel once (password and OTP may be asked even with a valid ticket), then agents use ssh lxplus9NN.cern.ch non-interactively:
Host lxtunnel
HostName lxtunnel.cern.ch
User <user>
GSSAPIAuthentication yes
GSSAPIDelegateCredentials yes
ControlMaster auto
ControlPath /tmp/ssh-cm-%u-%r@%h:%p
ControlPersist 12h
Host lxplus*.cern.ch
User <user>
ProxyJump lxtunnel
GSSAPIAuthentication yes
GSSAPIDelegateCredentials yes
ControlPath on local disk (/tmp), not NFS/AFS. That makes the master node-local: the agent must run on the same login node as the user's ssh -fN. The master can drop before ControlPersist (logout, node cleanup); re-check before each batch of work.BatchMode off shows ssh_askpass: exec(...): No such file or directory and Too many authentication failures. Stop and ask the user to reopen it.Could not resolve hostname lxplus.cern.ch.cern.ch: the local ssh config appends the domain. Use the lxplus alias.PreferredAuthentications.".bashrc: Permission denied", or condor 401 on a node: no AFS token. Reconnect with GSSAPIDelegateCredentials=yes, or run aklog.ssh host 'cmd' doesn't load the login profile, so module load etc. are missing. Use ssh host "bash -lc '...'".ssh host 'bash -s' <<'EOF', the remote stdin is the script itself. A cat, awk or python3 - inside reads the rest of the script.kinit again (kinit -R is refused).Permission denied (publickey,gssapi-with-mic,keyboard-interactive);[Errno 13] Permission denied: '/afs/.../.crab3.NNNN';eos ls returns an empty listing, not an error.klist -s (exit code), not by reading "renew until". Before reading "empty" as "done", make one call you know must succeed.condor_q fails. Only count jobs from a query that succeeded; a watcher once read the failure as "no jobs" and exited.lxplus (and cmslpc-el9) is round-robin, and /tmp is node-local. Files written in one ssh call are gone in the next. Pin a node (lxplus9NN, cmslpc3NN), or keep state on AFS/EOS./tmp loses old files (lost runtime libraries after a few days). Don't keep anything precious there.kex_exchange_identification: Connection closed). Pick a specific node.KillUserProcesses=yes: nohup / setsid processes are killed silently at ssh logout. Either hold the ssh session open (a local background job with a long timeout) or use HTCondor. lxplus-gpu is interactive only, for the same reason./afs/cern.ch/work/<u>/<user> doesn't exist). Use the AFS home for small runs (fs lq ~, ~2 GB), and suggest the user request a work volume for anything bigger.$HOME ~3 GB, /uscms_data 200 GB soft for all projects.set -u while sourcing LCG/CMSSW/key4hep setup scripts fails (COMPILER: unbound variable). Wrap them in set +u … set -u.set -o pipefail with xzcat big | awk '...exit' returns 141 (SIGPIPE) after a correct result.cmd | grep -v X && next: grep exits 1 when it prints nothing, so next is silently skipped.root:// URLs through Python pathlib: Path("root://h//p") becomes root:/h/p.pkill -f with a pattern that also matches your own shell or ssh command.More field notes, each from a real failure.
-o HostKeyAlias=lxplus.cern.ch. If your ssh config has HostName %h.cern.ch, pass the bare node name.X509_USER_PROXY; export it in every remote command.kinit (! kinit <user>@CERN.CH in Claude Code).-B ${XDG_RUNTIME_DIR} --env KRB5CCNAME=FILE:${XDG_RUNTIME_DIR}/krb5cc to see /eos/user. Without it, it silently falls back to the AFS home.scp no longer expands remote {a,b}; use ssh lxplus 'tar cf - a b' | tar xf -.pkill -f/pgrep -f over ssh matches the remote bash -c of that same ssh command: it killed its own session and gave false "still running" answers. List processes, then kill explicit PIDs.echo ===== fails (=word expands to a command path), and $var isn't word-split. Process substitution <(...) can fail in sandboxed shells.os.get_terminal_size() crash without a TTY. Use tmux, or run the generated executables directly.XDG_CACHE_HOME, MPLCONFIGDIR and PIP_CACHE_DIR at /tmp/$USER.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub cms-ml/marketplace --plugin af-cern-lxplus4 skills in this plugin
/crabUse when submitting, monitoring or recovering CMS CRAB tasks on EL9: crab-setup and proxy delegation, sandbox size limits, memory/cores and maxJobRuntimeMin, site white/blacklists, crab resubmit vs recovery tasks with a lumiMask, PrivateMC seeds, CRAB as a backend for non-cmsRun payloads (law/dhi combine fits), or decoding CRAB failures such as SUBMITREFUSED, SUBMITFAILED, exit 50660, 50665, 50115, 8021, 8028, 60323, 60326, 60328, "Argument list too long", "A different CMSSW configuration was already cached" or "Problems delegating My-proxy"./eos-xrootdUse when reading, writing, copying, verifying or deleting files on CERN EOS (eoscms, eosuser) or FNAL EOS (cmseos) from login nodes, batch or grid jobs: building root:// URLs, xrdcp/xrdfs/eos CLI commands, checksum-verified copies, FUSE vs xrootd in jobs, quota checks (eos quota, inode quota), bulk deletes and the CMS recycle bin, sharing via the www area, uproot over root://, or errors such as "MGM root://localhost not online/reachable", "Operation expired", "Redirect limit has been reached", "No servers are available to read the file", "[3021] Unable to get quota space" or being mapped to user nobody./lxplus-htcondorUse when writing a CERN HTCondor (lxbatch) submit file (.sub) or debugging CERN batch jobs, CPU or GPU: choosing between the standard schedd and EosSubmit, sizing request_memory/request_cpus/request_gpus, picking a +JobFlavour or +MaxRuntime, staging outputs to EOS with xrdcp, jobs sitting idle that never match, held jobs ("FILETRANSFER: plugin for type root not found", HoldReasonCode 12/13), jobs removed by SYSTEM_PERIODIC_REMOVE for wall time or disk, requirements overwritten by the schedd, Kerberos/EOS access inside jobs, DAGMan campaigns, or resubmitting missing outputs.Other plugins' skills for the same job