Appearance
VS Code Remote-SSH
When you’re working on a remote server but still want the comfort of your VS Code interface, the Remote-SSH extension is your best friend. It lets you open folders, edit code, and even run notebooks directly on your remote machine — all while working through VS Code on your local computer.
It feels like you’re coding locally, but everything actually runs on the remote system.
Why Use VS Code Remote-SSH?
Normally, when you connect to a remote server using SSH, you do everything from the terminal — editing files with nano or vim, manually transferring data, etc. That works, but it’s not always the most comfortable workflow.
With VS Code Remote-SSH, you can:
- Edit remote files directly in VS Code
- Run Python or FEniCS code on the remote server
- View logs, terminals, and outputs — just like you do locally
- Avoid constant
scporrsynctransfers back and forth
In short, it gives you the full VS Code experience — just connected to your remote machine.
Step 1 — Install the Remote-SSH Extension
- Open VS Code on your local machine.
- Go to the Extensions tab (📦 icon on the left sidebar).
- Search for “Remote - SSH” by Microsoft and click Install.
Once installed, you’ll see a small green icon in the bottom-left corner of VS Code — that’s your remote connection control.
Step 2 — Connect to Your Remote Server
Click on the green icon (bottom-left corner).
Choose “Connect to Host…” → then “Add New SSH Host”.
Enter your SSH command, like:
bashssh username@server_ipChoose your SSH config file (usually
~/.ssh/config) when prompted.Now click again on the green icon → “Connect to Host…” → and select the saved host.
VS Code will open a new window, connect to your server, and set up everything automatically. You’ll see a message like “Installing VS Code Server on remote host…” — that’s normal, it happens only the first time.
Step 3 — Open Folders and Start Working
Once connected, you can:
- Open any remote folder (
File → Open Folder) - Edit scripts and notebooks directly
- Run terminals (they’ll execute on the remote machine)
- Use extensions like Python or Jupyter — they’ll work remotely too
You’re now effectively coding inside the server, but with your familiar VS Code setup.
Notes
- Make sure you can SSH into your server normally before trying Remote-SSH — it uses the same SSH keys.
- You can switch between local and remote windows easily — VS Code shows a green bar with the host name when you’re connected remotely.
- The first connection might take a minute while it installs the VS Code Server on the remote machine.
- You can also manage multiple servers — just add them to your
~/.ssh/configfor quick access. - Works great with cloud machines (AWS, DigitalOcean, GCP) or university HPC systems.
Summary
- VS Code Remote-SSH lets you code, run, and debug directly on remote machines — using the same editor you already love.
- You get all the comfort of VS Code while your code runs where the real computing power is — the remote server.
- Once set up, it’s seamless — no more messy file transfers, just pure remote productivity.
If you do most of your heavy simulations or coding on remote systems, Remote-SSH will make your workflow smoother, faster, and way more enjoyable.