Installing VS Code
Last updated on 2026-08-27 | Edit this page
Overview
Questions
- How do I install VS Code on my operating system?
- How do I install the Remote-SSH extension?
Objectives
- Install VS Code on Windows, Mac, or Linux
- Install and enable the Remote-SSH extension
- Enable the critical DUO MFA setting
Step 1: Install Visual Studio Code
VS Code is free and available on all major operating systems.
Windows
- Visit code.visualstudio.com
- Click the Windows download button (Windows x64 Installer)
- Run the downloaded installer and follow the wizard (defaults are fine)
- Verify: open PowerShell and type
code --version
Mac
- Visit code.visualstudio.com
- Click the Mac download button (choose Intel or Apple Silicon)
- Open the .zip and drag “Visual Studio Code.app” to Applications
- Verify: open Terminal and type
code --version
Linux (Ubuntu/Debian)
BASH
sudo apt update
sudo apt install software-properties-common apt-transport-https wget
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
sudo apt update && sudo apt install code
Verify: code --version
Linux (Fedora/RHEL)
BASH
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo'
dnf check-update && sudo dnf install code
Step 2: Install Remote-SSH Extension
- Open VS Code
- Click the Extensions icon on the left sidebar (four squares icon)
- Search for “Remote-SSH”
- Find Remote - SSH by Microsoft (the official one)
- Click Install
You should now see a “Remote Explorer” icon in the left sidebar.
Step 3: Enable Login Terminal for DUO
Essential: Enable Login Terminal for DUO Authentication
Before connecting, you MUST enable one critical setting:
- Open Settings: File > Preferences > Settings (Ctrl+, or Cmd+,)
- Search for:
remote.SSH.showLoginTerminal - Check the checkbox to enable this setting
Why this matters: Sagehen HPC requires DUO MFA. Without this setting, DUO prompts appear in an invisible terminal and you cannot authenticate. This is the number one reason people cannot connect initially.
Challenge: Verify Your Installation
- Run
code --versionin your terminal. Do you get a version number? - Open VS Code and check Extensions. Is “Remote - SSH” installed?
- In Settings, search
remote.SSH.showLoginTerminal. Is it checked?
-
code --versionshould print a version like1.87.2. If “command not found,” VS Code is not installed or not in your PATH. - Remote - SSH should appear in Extensions with an “Installed” badge.
- The checkbox should show a checkmark next to “Show Login Terminal”.
- Install VS Code from code.visualstudio.com for your operating system
- Install the Remote-SSH extension by Microsoft from the Extensions sidebar
- Enable
remote.SSH.showLoginTerminalin settings – this is required for DUO