VS Code¶
VS Code reaches Hydra three ways. Remote-SSH connects the VS Code on your own machine to a login node, which is fine for editing files and nothing more. The login-node limits apply to anything it runs. The other two run VS Code itself on a compute node and show it in your browser, through an ssh tunnel or through a tunnel that Microsoft relays.
| Way | Where VS Code runs | Needs | Use for |
|---|---|---|---|
| Remote-SSH | your machine; a helper on a login node | the Remote-SSH extension | editing files; nothing that computes |
| VS Code server | a compute node, shown in your browser | an ssh tunnel from your machine | any interactive work |
| VS Code tunnel | a compute node, shown in your browser | a GitHub account; no ssh tunnel | the same, and from telework.si.edu |
The tools/vscode module also provides vscode-desktop, a windowed VS Code over X11, which needs an X server that supports it and is slow. The module's start-vscode script offers desktop, server and tunnel at a prompt.
Use Remote-SSH from your own VS Code¶
- Install VS Code and the Remote-SSH extension on your machine.
- Remote-SSH: Connect to Host, enter
[email protected], and log in with your Hydra password.
Remote-SSH runs its helper on a login node
Anything you start from its terminal is under the login-node limits. For anything that computes, submit a job or open an interactive session.
Start a VS Code server on a compute node¶
-
On a login node, start an interactive session, then load the module and start the server:
$ qrsh $ module load tools/vscode $ start-vscode-server start-vscode-server: starting vscode server on host=compute-64-15 IP=192.168.92.85 and port=8000 you need to create a ssh tunnel on your local machine with ssh -N -L 8000:192.168.92.85:8000 [email protected] in a terminal window. ... Web UI available at http://192.168.92.85:8000?tkn=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxThe script prints the tunnel command and waits. Press Enter to start the server, or start the script with
-no-pauseto skip the wait. The token changes every start.-token STRINGfixes it and-no-tokenremoves it.start-vscode-server -helplists the options. -
On your own machine, open the tunnel the script printed, in a terminal you leave alone:
$ ssh -N -L 8000:192.168.92.85:8000 [email protected] -
In a browser, open
http://localhost:8000?tkn=TOKENwith the token from step 1. Uselocalhost. The192.168.…address the server prints is reachable only inside the cluster.
-
When done,
Ctrl-Cin the server's window,Ctrl-Cin the tunnel's terminal, thenexitthe session.
Use a VS Code tunnel¶
A tunnel registers the compute node with Microsoft's relay under a name, and you open vscode.dev with that name. It needs a GitHub account for authentication. SI Microsoft accounts fail because of SI's MFA setup.
-
In an interactive session, load the module and start the tunnel:
$ qrsh $ module load tools/vscode $ start-vscode-tunnel start-vscode-tunnel: starting a tunnel, name: USERNAME-compute-64-15 to access the tunnel, point your browser to https://vscode.dev/tunnel/USERNAME-compute-64-15 on your local machine. ... ? How would you like to log in to Visual Studio Code? › Microsoft Account [] GitHub Account To grant access to the server, please log into https://github.com/login/device and use code ABE4-F1A6 -
Press Enter when the script asks, to start the tunnel. Then choose GitHub Account with the arrow keys, open the device-login URL in a browser, and enter the code.
-
Open
https://vscode.dev/tunnel/USERNAME-compute-64-15in a browser. Choose GitHub if it asks how to authenticate.
-
When done,
Ctrl-Cin the tunnel's window, thenexitthe session.
If the tunnel fails at start with error failed to lookup tunnel: connection error, run host use.rel.tunnels.api.visualstudio.com once, which returns an address, and start the tunnel again. To reset the stored credentials, delete ~/.vscode/cli/token.json.
Further reading¶
- Start an interactive session for the session and tunnel this page builds on
- Find and load software for the compilers and interpreters VS Code will find on the node
Last updated 2026-10-03