Logging into AICR with Claude
How to let Claude Code log into the AICR cluster for you and run commands there, while your key and your passphrase never leave your hands. Part of the series Research Computing on Explorer and AICR, built from Northeastern Research Computing's training material. Liam, in for Bear, narrates.
Logging into AICR with Claude
How to let Claude Code log into the AICR cluster for you and run commands there, while your key and your passphrase never leave your hands. Part of the series Research Computing on Explorer and AICR, built from Northeastern Research Computing's training material. Liam, in for Bear, narrates.
Chapters 0:00 Opening 0:12 The idea 0:26 Terms in this lecture 0:47 I · What AICR Checks 2:08 II · Unlock Once 3:36 III · Do It For Real 5:17 IV · Rules For A Shared Cluster 6:36 V · When It Fails 7:40 Recap 8:02 Your turn
Your turn. Paste this into Claude:
Log into the AICR cluster with ssh aicr and run read-only commands only. Run: whoami, hostname, pwd, sinfo -o "%14P %11l %6D", squeue -u $USER. Tell me the user name, the host, and which partitions exist. Do not submit, cancel or change anything, and do not run computation on the login node.
Then check two things yourself: did Claude run only read-only commands, nothing that submits or changes? did Claude ever ask for, or print, your passphrase or key? It should not.
Sources
- Source (the whole of it): /Users/bear/Documents/CoWork/bear-textbooks/books/hpc-aicr/Logging-into-AICR-with-Claude/README.md. Read in full 2026-10-11. Questions about the clusters: rchelp@northeastern.edu.
Made with the brutalist.art toolkit: Manim, Remotion and Kokoro, free and local. Narration is synthetic (Liam, in for Bear). This is an independent educational film, not an official Northeastern publication.
▶ The full series playlist — Brutalist https://www.youtube.com/playlist?list=PLG9H-C6rp5RU
What this video covers
- 0:00 — Opening
- 0:12 — The idea
- 0:26 — Terms in this lecture
- 0:47 — I · What AICR Checks
- 2:08 — II · Unlock Once
- 3:36 — III · Do It For Real
- 5:17 — IV · Rules For A Shared Cluster
- 6:36 — V · When It Fails
- 7:40 — Recap
- 8:02 — Your turn
Transcript
A lightly formatted transcript of the video, with timestamps so you can jump to any section on YouTube.
Opening
[0:00] Research computing on Explorer and AICR. Logging into AICR with Claude. How to let Claude code log into the AICR cluster for you and run commands there while your key and your passphrase never leave your hands.
The idea
[0:13] Hello, this is Liam in for Bear. First, a correction. To let Claude log into AICR, the shared GPU cluster, you do not hand it your password. AICR has no password. You unlock a key once yourself and Claude never sees it.
Terms in this lecture
[0:26] Six terms: a private key, a secret file that proves who you are. A certificate, a signed note from AICR saying that key is yours. A passphrase, the password that locks the key file. The SSH agent, a helper that holds your unlocked key in memory. Batch mode, a setting that makes SSH refuse to ask any question. And a login node, the shared computer you land on when you log in.
I · What AICR Checks
[0:47] AICR has no password. At the front door, it checks two things: a private key, a secret file that only you hold. And a certificate, a note that ICR's own certificate authority signed saying that key is yours. To get in at all, you need an account. A faculty member's proposal opens a project, and your institution creates your user. Your AICR username is your campus name with the institution on the end, like JSmith_NEU. The key files come from one place, the AICR on demand portal at ood.aicr.ai. You sign in there with your institutional credentials. That step is yours, not Claude's. Download the folder called AICR keys. Inside are four files: your private key locked with
A passphrase, its public half, your certificate, which is the credential, and a file holding your first passphrase. Signing in is the human step, so are putting the files in place and choosing a new passphrase. Do not give Claude your institutional password, and do not ask it to sign in for you. Put the files in your .ssh folder, set their permissions, and swap the first passphrase for one only you know. Windows is the same in PowerShell. Then delete the downloaded passphrase file. Check the certificate with ssh-keygen -l. Valid is a date range or forever. Principals must be your AICR username. When it nears its end, renew it in the on-demand portal. Now the problem.
II · Unlock Once
[2:10] Claude code runs commands with no keyboard attached. If SSH stops to ask for the passphrase, nobody can answer and the command hangs or fails. The fix is not to give Claude the passphrase. The fix is to unlock the key before Claude arrives once in your own terminal into a helper called ssh-agent. The agent holds the unlocked key in memory. From then on, when SSH needs the key, it asks the agent and the agent answers. The key never leaves the agent. Claude does the work. The secret never passes through it. Add one block to your SSH config. Host AICR gives the cluster a short name, then its host name, your AICR username, your key file, and your certificate file. IdentitiesOnly offers
Just this key. ServerAliveInterval stops idle connections dropping. AddKeysToAgent loads the key into the agent on first use. UseKeychain is for Mac OS only and IgnoreUnknown makes other systems skip it. On a Mac, unlock it with ssh-add and the Apple keychain flag so the passphrase survives restarts. On Linux, start an agent, add the key, and start Claude code from that same terminal. On Windows, open PowerShell as administrator once. Set the agent service to start automatically, start it, and add the key. Each of these asks for your passphrase in your own terminal. Type it there, never in a prompt to Claude. Then ask the agent what it holds. One line ending in ed25519 means the key is loaded. Test it by hand
III · Do It For Real
[3:37] First. Run ssh AICR hostname. You should get login.aicr.ai. The very first connection asks you to confirm the host key. Type yes yourself because Claude cannot answer that. Then test it the way Claude connects with batch mode on. Batch mode makes SSH fail at once instead of asking anything. If it prints your username and the host, Claude can log in. Now a real run. Claude code ran one SSH command with batch mode on. Before this call, the agent held no keys. The command asks for the username, the host, and the date. The cluster answered with its seven partitions and an empty job queue because nothing was running. The last line is the home directory named after the user. Now the test that matters. When you reboot, the agent forgets everything. So, empty it on purpose and see whether Claude can still get in. Ask the agent what it holds. One key. Empty it
With SSH add {dash} capital D. Ask again, nothing. The agent is empty just as it is after a reboot. Now log in the way Claude does with batch mode on in an empty agent. It still works. No prompt, no passphrase typed, and ask the agent again, the key is back. On a Mac, that is the keychain at work. Add keys to agent asks it for the passphrase, and the key goes back into the agent. Nothing was typed, and nothing passed to Claude. On Linux and Windows, there's no keychain to reload the key. So, this same test fails until you run SSH add again. That is expected. It tells you to run SSH add at the start of each session. How did it get in? Ask SSH to show its steps. It found one key in the agent and offered the certificate. The server accepted it, and SSH reports it authenticated with public key.
IV · Rules For A Shared Cluster
[5:18] When you ask, Claude runs one SSH command with batch mode on followed by your read-only commands. Claude code asks you to approve it. On a shared system, approve each SSH command at least the first few times. Rule one, read-only first. Look before you change anything. Sinfo, SQ for your own jobs, Sact, job stats, LS, and module avail. Rule two, never compute on a login node. Login nodes are shared, capped at four CPU cores and 8 GB of memory per user. Heavy work goes through Slurm, the scheduler, sbatch, or salloc and srun for a live session. Rule three, ask before sbatch, scancel, rm, or anything that writes outside your own project. Jobs use shared GPUs
And they count against your project. Rule four, never print, copy, or upload the private key. Not cat, not scp, not into the chat. Claude does not need to read the key to use it. The agent does that. Rule five, never put the passphrase in a prompt, a file, or a command. If a command asks for it, stop and unlock the key yourself in your own terminal. Rule six, use your own account only. The certificate names you, so do not use it to run work for anyone else. And rule seven, mind where files live. Home is small and recoverable. Scratch is large and it is purged. Check AICR's file system page before you move data.
V · When It Fails
[6:37] The error you will see most is permission denied public key. It usually means one of three things. The key is not unlocked, by far the most common after a reboot, or the certificate is expired or missing, or the key's permissions are wrong. Here is the trap, an empty agent looks exactly like an expired certificate. The error is the same. So, check the agent with ssh-add -l before you blame the certificate. Then, if the agent holds the key, check the certificate. Is it still valid? If it is not, renew it in on demand and set the private key's permissions to 600. Other messages have short fixes. A command that hangs or wants a passphrase, unlock the key yourself. Host key verification failed, remove the old entry with ssh-keygen -r, then connect once yourself. A new host key prompt, type yes. Bad configuration option, add ignore unknown above the keychain line. Connection timed out, try another network because AICR needs no VPN. Drops when idle, server alive interval 60. Empty after a restart, ssh-add again on a Mac with the the flag.
Recap
[7:42] Let's recap with Claude. AICR checks a key in a certificate, not a password. Claude cannot type a passphrase, so you unlock the key once into the SSH agent. Test with batch mode, even an emptied agent logged in on a Mac. Claude runs read-only commands and asks before it changes anything. The key and the passphrase never go into a prompt. And when you see permission denied, check the agent before you blame the
Your turn
[8:02] Certificate. Your turn. Paste this into Claude. Log into the AICR cluster with SSH AICR and run read-only commands only. Run who am I, hostname, pwd, sinfo with its output format set to %14p, %11l, %6d and sq for my own user. Tell me the username, the host, and which partitions exist. Do not submit, cancel, or change anything, and do not run computation on the login node. Then check two things yourself. Did Claude run only read-only commands, and did it ever ask for or print your passphrase or your key? Logging into AICR with Claude at Nick Bear Brown.





