Follow these steps to properly set up SSH access to the Grid in Visual Studio Code. If you SSH to the Grid in VSCode without following these steps, your VSCode connection won't be set up properly. This will cause VSCode to use resources on the login node Warrior, even if you start an interactive job in VSCode.
Any computationally intensive processes on Warrior are forbidden, and you will be warned if you're connecting this way. If you continue to run VSCode this way, your processes on Warrior will be killed.
VSCode 1.98 is the last release that is compatible with our OS, please be sure to
download that version. The large download button will redirect to the latest version, please select the links underneath
February 2025 (version 1.98)
Follow the steps below to properly set up SSH access to the Grid in Visual Studio Code. For the steps of the tutorial that need to be done on the Grid, please connect to the Grid using a different SSH client or the Grid OnDemand. You can get a shell on the Grid OnDemand by going to Clusters > HPC Grid Access.
Step 1
On the Grid, generate an ED25519 SSH key by running: ssh-keygen -t ed25519
- This will create a key pair in ~/.ssh/
- You will also need to add the id_ed25519.pub to your authorized_keys file in ~/.ssh/
- Copy the id_ed25519.pub and then add to the authorized_keys file using a text editor
Step 2
Copy your private key to your local system.
1. From Warrior:
- Locate your private SSH key:
~/.ssh/id_ed25519
2. To your local system:
- Copy the key file to the following equivalent location
- Rename zz9992 with your own AccessID: %USERPROFILE%\.ssh\id_ed25519_zz9992
Step 3
Generate and set up your SSH config file.
1. On Warrior:
- Run the following command to generate an SSH configuration file:
/wsu/apps/scripts/generate_vscode_ssh_jump_config.sh
- This will create a file named vscode_ssh_config
2. On your local system:
- Copy the contents of the generated file and save it as your SSH config file: %USERPROFILE%\.ssh\config
Step 4
For VSCode, you will only SSH to a compute node not Warrior. You must submit a job on the Grid to get a compute node. We’ve created an example job script that you can modify and use for this purpose. This job requests minimal resources and can be modified if you require more. It has a sleep command that is set to the same amount of time as the time limit of the job. If you modify the time limit of the job, be sure to modify the sleep command to match it.
- On the Grid, copy the example job script:
cp /wsu/el7/scripts/tutorial/vscode_job .
- Submit the job: sbatch vscode_job
- Check the name of the node your job is on by using this command checking NODELIST:
qme
Step 5
Connect to the Slurm Job Node in VSCode.
1. Open VSCode and open the command palette with Ctrl + Shift + P / Cmd + Shift + P
2. Type ssh in the command palette
3. Select Connect to Host…
4. Enter the node name of your Slurm job