Skip to content

VS Code Desktop (Remote-SSH)

The VS Code Desktop (Remote-SSH) app reserves CPUs, memory and GPUs on one of your lab's nodes through Slurm, then lets the VS Code app on your own computer connect to that reservation with the Remote-SSH extension. Everything VS Code runs (terminals, the Python interpreter, debuggers, language servers) runs inside your Slurm job on the node, with the resources you asked for.

Only connect through this app

Don't point Remote-SSH at hpc.eng.umd.edu. That host is the Slurm controller and portal; a VS Code server there slows down the scheduler for everyone. The setup on this page connects to your job on a compute node instead.

One-time setup on your computer

  1. Install Visual Studio Code.
  2. Install the Remote - SSH extension (ms-vscode-remote.remote-ssh) from the Extensions panel.
  3. Make sure you have an OpenSSH client. macOS and Linux have one; on Windows 10/11 it's built in (Settings → System → Optional features → OpenSSH Client).
  4. Be on the UMD network or connected to the UMD VPN (GlobalProtect).

Starting a session

  1. Open https://hpc.eng.umd.edu → Interactive Apps → VS Code Desktop (Remote-SSH).
  2. Fill in the form. It has the same resource fields as Lab Desktop (see Launching a desktop), plus:
    • AD password — needed if you want your lab's CIFS shares (/mnt/... and the matching shortcuts in $HOME). The form marks it required when your lab has shares.
    • Lmod modules to load — space-separated, e.g. miniconda3 myproject/v1. Loaded after your lab's default modules in every VS Code terminal and process.
  3. Click Launch and wait for the session card to show Running.

Connecting VS Code

1. Add the host to your SSH config (once per node)

The session card shows an SSH config block like this:

Host enbehpavw1202a-vscode
  HostName enbehpavw1202a.ad.umd.edu
  Port 2222
  User <directoryID>

Copy it into your SSH config file:

  • macOS / Linux: ~/.ssh/config
  • Windows: C:\Users\<you>\.ssh\config

You only need to do this once per node. Later sessions on the same node reuse the same entry. Keep Port 2222: that port is the one that connects you to your job.

2. Open VS Code

Click Open in VS Code on the session card. Your browser asks to open VS Code; allow it. VS Code opens a new window and connects to the node.

You can also connect from VS Code itself: Command Palette → Remote-SSH: Connect to Host… → pick the -vscode host.

The first time:

  • VS Code asks you to confirm the host's fingerprint. Accept it.
  • It may ask what platform the remote host is. Pick Linux.
  • It installs its server into ~/.vscode-server on the node. This takes a minute or so, once per node.

3. Sign in

Enter your AD password when VS Code prompts for it (your UMD directory password). SSH keys are not accepted.

While you're connected

  • Resources are your job's. Terminals, tasks and the debugger are limited to the CPUs, memory and GPUs you requested. Check with nvidia-smi or echo $SLURM_JOB_ID in a VS Code terminal.
  • Modules are already loaded. Your lab's default modules and anything you entered in the form are loaded in every terminal. Run module list to check.
  • Extensions install on the node. Remote extensions (Python, Pylance, Jupyter, ...) install into ~/.vscode-server on that node. Home directories are local to each node, so a different node means installing them again. See Your lab storage.
  • Port forwarding works. VS Code's Ports panel can forward a port from the node (TensorBoard, a dev web server) to your computer.
  • Submitting batch jobs. sbatch and hpcrun work from a VS Code terminal like they do in any other session.

Ending the session

Closing VS Code does not end the session. Your cores, memory and any GPUs stay reserved until the walltime runs out.

When you're done, go to My Interactive Sessions and click Delete on the session card. VS Code disconnects as soon as the session ends, and the same happens automatically at walltime. See Releasing GPUs promptly.

You can close VS Code and reconnect later with Open in VS Code as long as the session is still running.

Troubleshooting

Symptom Cause / fix
An error saying you have no active job on the node, right after entering the correct password You have no running VS Code Desktop session on that node. Check My Interactive Sessions: the session must be Running (not Queued), and on the same node as the host you're connecting to.
Connection was working, then dropped The session ended (deleted, or walltime reached). Start a new one.
Connection hangs or times out You're not on the UMD network or GlobalProtect VPN, or Port 2222 is missing from your SSH config entry.
VS Code connects to the wrong session With more than one session on the same node, VS Code joins the newest. Delete the ones you don't need.
Lab shares under /mnt/ or the $HOME shortcuts are empty The AD password was left blank or was wrong. Delete the session and relaunch with the correct password.
Host key verification failed The node was reinstalled. Remove its lines from ~/.ssh/known_hosts (search for the node name and :2222) and reconnect.
The Open in VS Code button does nothing VS Code isn't installed or isn't registered for vscode:// links. Connect from the Command Palette instead (see above).