Lab 02 — VS Code Remote-SSH + an AI coding assistant

Goal

Turn raw SSH access into a productive development environment: an editor that runs locally but sees files on the cluster, with an AI coding assistant of your choice integrated into the same workflow.

By the end of this lab you’ll be editing Python files that live on Unity, running them on Unity, asking your AI assistant to debug them — all without ever leaving VS Code on your laptop.

You’ll pick one assistant for the rest of this course based on the institutional access you have through OSU. Your three options:

  • Claude Code (Anthropic) — terminal-driven, strong diff-review and agent-style edits
  • GitHub Copilot (Microsoft / GitHub) — free for students via GitHub Education, strong inline completions
  • Gemini Code Assist (Google) — through your OSU Google Workspace account

Any of them works for every other lab. Pick the one whose login you already have.


Reading

Budget ~25 minutes for the reading.


Learning objectives

By the end of this lab you will be able to:

  1. Connect VS Code Remote-SSH to Unity using your ~/.ssh/config from Lab 1.
  2. Configure the VS Code SSH timeouts so the connection process accommodates Duo MFA.
  3. Install an AI coding assistant extension on the remote (cluster) side, not just locally.
  4. Authenticate the assistant with an OSU institutional account where applicable.
  5. Use the assistant to write and run a small script, with diff review or inline completion in VS Code.

Setup / prerequisites

  • Lab 1 completessh unity works with one Duo prompt and multiplexing.
  • VS Code installed on your laptop (code.visualstudio.com).
  • Account credentials for at least one of the three assistants:
    • Claude Code: a Claude account (claude.ai; free tier works for this course)
    • GitHub Copilot: a GitHub account with GitHub Education verification using your .osu.edu email (free for verified students)
    • Gemini Code Assist: an OSU Google account (your buckeyemail is typically linked)

OSU students often have access to multiple of these — see Handbook §7.1 for the institutional-access summary and privacy-tier guidance.


Tasks

1. Install the Remote-SSH extension (5 min)

  1. Open VS Code → Extensions panel (Cmd+Shift+X)
  2. Search for Remote - SSH
  3. Install the one published by Microsoft (verified publisher)

2. Configure VS Code timeouts (5 min)

Cmd+Shift+PPreferences: Open User Settings (JSON) → add (or merge with existing):

{
    "remote.SSH.connectTimeout": 120,
    "remote.SSH.useLocalServer": true,
    "remote.SSH.showLoginTerminal": true,
    "remote.SSH.remotePlatform": {
        "unity": "linux"
    }
}

Save.

3. Connect to Unity (5 min)

  1. Cmd+Shift+PRemote-SSH: Connect to Host…
  2. Select unity (VS Code reads your ~/.ssh/config)
  3. New VS Code window opens; approve one Duo push
  4. Bottom-left corner should turn green: SSH: unity

If it hangs or times out, see “Common issues” below.

4. Open a working directory on Unity (3 min)

  1. File → Open Folder…
  2. Navigate to (or create) ~/hpc_practicum/ on Unity
  3. Open it

5. Open VS Code’s integrated terminal — and verify it’s on Unity (2 min)

Press Ctrl+` (backtick). The terminal that opens should be running on Unity, not on your Mac. Confirm:

hostname              # should be a Unity hostname, not your laptop's
echo $USER            # should be yourname.##

6. Install your chosen AI assistant — pick ONE track (10–15 min)

Important

The single most common mistake: installing the extension on Local instead of SSH: unity. After installing, the Extensions panel will show two sections — make sure your assistant appears under “SSH: unity - Installed”, not just under “Local - Installed”. If it’s only local, click the extension’s gear icon → Install in SSH: unity.

Track A — Claude Code

  1. From a fresh laptop browser tab, sign in at claude.ai once so the auth flow is ready.
  2. In the VS Code integrated terminal (on Unity), install the Claude CLI per Anthropic’s instructions.
  3. cd ~/hpc_practicum/ && claude — the first run prompts to install the VS Code extension. Accept.
  4. Confirm in the Extensions panel that Claude Code appears under SSH: unity - Installed.

Self-check: In an integrated terminal, which claude returns a path on Unity, and the Claude Code icon is visible in VS Code’s left sidebar.

Track B — GitHub Copilot

  1. One-time: activate your GitHub Education student benefits at education.github.com using your .osu.edu email. Wait for verification (can take a few minutes to a day).
  2. In VS Code’s Extensions panel (Cmd+Shift+X), search for GitHub Copilot and GitHub Copilot Chat.
  3. Install both — and make sure each shows under SSH: unity - Installed.
  4. When prompted, sign in with your GitHub account; authorize Copilot in your browser.

Self-check: A small Copilot icon appears in the VS Code status bar (bottom-right). Click it to confirm “Status: Ready”.

Track C — Gemini Code Assist

  1. One-time: verify your OSU Google account works at gemini.google.com. Sign in with your buckeyemail.osu.edu address.
  2. In VS Code’s Extensions panel, search for Gemini Code Assist.
  3. Install — and make sure it shows under SSH: unity - Installed.
  4. Sign in with your Google account when prompted.

Self-check: A Gemini icon appears in VS Code’s left sidebar; clicking it opens a chat panel.

7. Use your assistant to write and run a script (10 min)

The exact UI differs slightly per tool, but every one of them can take a natural-language request and either propose code in chat or directly edit a file. Try this:

The prompt (paste into your assistant’s chat or terminal):

Create a Python file hello_cluster.py in this directory that:

  • Prints the hostname of the machine it’s running on
  • Prints any environment variables starting with “SLURM_” (or notes if there are none — we’re on the login node, not a Slurm job)
  • Prints the available CPU count (os.cpu_count()) and total RAM (using psutil.virtual_memory().total if psutil is installed, otherwise just skip)

Then run it.

What you should see depends on the assistant:

  • Claude Code: the diff viewer pops up showing the proposed hello_cluster.py. Accept. Claude then runs it in the integrated terminal; the output appears.
  • Copilot Chat: the chat panel shows the proposed code. Click Apply to create the file. Then run it manually: python hello_cluster.py.
  • Gemini Code Assist: the chat shows the proposed code. Click Insert or copy-paste into a new file. Run it manually.

Read the output. Confirm you understand each printed value.

8. (Optional) Set up auto-save (2 min)

Cmd+, to open settings, search auto save → set Auto Save to afterDelay with delay 1000. When your assistant edits an already-open file, the editor reloads cleanly.


Deliverables

Save to lab02/ in your personal repo:

  1. Screenshot showing:

    • Bottom-left SSH: unity indicator in green
    • The integrated terminal showing a Unity hostname
    • The Extensions panel scrolled to show your AI assistant’s extension under “SSH: unity - Installed”

    Save as lab02/vscode_connected.png.

  2. lab02/hello_cluster.py — the file your assistant generated (or your edited version), saved on Unity in ~/hpc_practicum/ and copied to your deliverables.

  3. lab02/which_assistant.md — a brief note (3–5 sentences):

    • Which assistant did you install — Claude, Copilot, or Gemini?
    • Which OSU institutional account did you use to authenticate?
    • Why did you pick this one (access, familiarity, recommendation)?
  4. lab02/reflection.md — 3–5 sentences:

    • What does it mean that the integrated terminal “runs on Unity”?
    • Where does hello_cluster.py physically live — on your Mac or on Unity?
    • What’s one thing that would have surprised past-you about how this AI-assisted, remote-cluster workflow feels?

Self-check


Common issues

❌ VS Code “Connecting with SSH timed out”

Most often: SSH multiplexing isn’t working, so VS Code’s parallel sub-connections each trigger Duo and race. Verify Lab 1’s Section 7 (two ssh unity from regular Terminal should give one Duo and one instant connect). If that works, increase remote.SSH.connectTimeout to 180.

❌ Assistant installed on the wrong side

If your assistant only appears under “Local - Installed”, click the gear → Install in SSH: unity. This is the most common source of “why doesn’t it see my files?” frustration.

❌ Integrated terminal opens on the Mac instead of Unity

You opened a Local VS Code window instead of one connected to Unity. Use Cmd+Shift+PRemote-SSH: Connect to Host to open a new remote window. The terminal in that window will be on Unity.

❌ Aliases / env vars from .bashrc don’t show up in the terminal

Your .bash_profile needs to source .bashrc. On Unity the default does this already — see Handbook §2 of Shell Environment for the fix if your .bash_profile is non-default.

❌ Copilot says “Status: Sign in required” even after signing in

This happens if your GitHub Education verification hasn’t completed yet, or your Copilot subscription expired. Visit github.com/settings/copilot to check status.

❌ Gemini Code Assist says “no access” with my buckeyemail address

OSU’s Google Workspace activation can lag — your departmental admin or the OSU IT help desk can sometimes expedite, but it may also just need to be re-tried later. In the meantime, switch to Track A or Track B.

❌ Claude Code says “claude: command not found” inside VS Code’s terminal

The CLI wasn’t installed on the cluster yet (Task 6 step 2), or your PATH doesn’t include where it went. Check ls -l ~/.npm-global/bin/claude (or wherever the install put it) and add to PATH in your .bashrc if needed.


Time estimate

  • Reading: ~25 min
  • Lab tasks: ~50 min (the first VS Code Remote-SSH connect downloads the VS Code Server on Unity, which takes ~30 seconds once)
  • Deliverables: ~10 min

Total: ~75 minutes


Extensions (optional)

  • Install a second assistant to compare them side-by-side. They don’t conflict in VS Code — you might end up using Copilot for inline completions and Claude Code in the terminal for bigger edits, for example.
  • Set up VS Code’s settings sync so your remote VS Code configuration follows you to new laptops.
  • Try the selection-prompting shortcut for whichever assistant you installed:
    • Claude Code: Option+K inserts an @file#L23-L45 reference into your Claude prompt
    • Copilot: Cmd+I opens an inline chat at the selection
    • Gemini: right-click → “Ask Gemini”
  • Explore the Problems panel — install a Python linter (pylint or ruff) on Unity in a mamba env, then watch your assistant see and fix the errors it surfaces.

What’s next?

Now that the development environment is in place, Lab 03 — Shell environment foundations turns to making your .bashrc work for you.