VSCode on Compute Node
Some VS Code extensions can launch excessive processes on login nodes and impact other users.
To avoid this, development work using VS Code should be performed on an interactive compute node.
This guide explains how to:
Perform the initial setup of a VS Code tunnel
Reconnect to the tunnel in future sessions
Requirements
SSH access to LCC or MCC
A GitHub or Microsoft account
Part 1 — Initial Setup (One-Time)
Step 1 — Log in via SSH
Open Windows Terminal or another SSH client (not VS Code).
ssh linkblue@mcc.uky.edu
cd ~
Step 2 — Install the VS Code Server
Download and extract the VS Code CLI:
curl -Lk 'https://code.visualstudio.com/sha/download?build=stable&os=cli-alpine-x64' --output vscode_cli.tar.gz
tar -xf vscode_cli.tar.gz
Step 3 — Request an Interactive Compute Node
Example (8-hour session):
srun --nodes=1 --cpus-per-task=4 --time=8:00:00 --partition=normal --account=coa_PIlinkblue_uksr --pty bash -iAfter allocation, your prompt will change to the compute node hostname.
Step 4 — Start the VS Code Tunnel
./code tunnelSelect the account you want to use (GitHub or Microsoft).
Step 5 — Authenticate in the Browser
Open the provided web link
Enter the authentication code
Sign in to the selected account
Confirm VS Code access
Step 6 — Name the Machine
You will be prompted to enter a machine name.
You may use:
the default hostname
or a descriptive name (for example,
MCC)
Step 7 — Wait for Server Initialization
The VS Code server will download and start.
Your SSH session will display:
Server started
Step 8 — Connect from VS Code
In VS Code:
Open Remote Explorer
Click Tunnels
Select your account
Choose the tunnel name
A new VS Code window will open connected to the compute node.
Part 2 — Reconnecting in Future Sessions
Repeat these steps each time you want a compute node session.
Step 1 — SSH to Cluster
ssh linkblue@mcc.uky.edu
Step 2 — Request Interactive Node
srun --nodes=1 --cpus-per-task=4 --time=8:00:00 --partition=normal --account=coa_PIlinkblue_uksr --pty bash -i
Step 3 — Start Tunnel
cd ~
./code tunnelAuthenticate if prompted.
Then connect via:
VS Code → Remote Explorer → Tunnels