Editing files on a remote Linux server doesn’t have to mean juggling terminal windows and copying config snippets by hand. By connecting VS Code to your Linux server over SSH, you get a full GUI file browser and editor — working directly on remote files as if they’re sitting on your local machine. In this guide I’ll walk you through installing VS Code on Windows, setting up SSH key authentication, and connecting to an Ubuntu server so you can browse and edit files remotely.
🎥Watch the Video Tutorial
💡Why Use VS Code for Remote SSH?
If you’re managing Docker compose files, editing configs, or writing scripts on a Linux server, doing it through a terminal editor like nano works — but it’s slow and error-prone for anything more than a quick change. VS Code’s Remote SSH extension gives you syntax highlighting, file browsing, and full editor power directly on the server.🛠What You’ll Need
- A Windows PC
- Visual Studio Code
- An Ubuntu server with SSH enabled
- Server IP and SSH user
📋Step-by-Step Setup
1. Install Visual Studio Code
Download from https://code.visualstudio.com2. Install Remote SSH Extension
Install the Microsoft Remote SSH extension from the Extensions panel.3. Generate SSH Key
ssh-keygen -t ed25519 -C "homelab"
4. Copy Public Key
notepad.exe C:\Users\User\.ssh\id_ed25519.pub
5. Paste Public Key
nano ~/.ssh/authorized_keys
6. Connect via VS Code
ssh username@server-ip -A