Video Tutorial (Optional)
Watch first if you want to follow the VS Code Remote SSH setup on a Raspberry Pi in real time.
Part 1 (SSH into the Raspberry Pi from your local computer):
Subscribe: Youtube
Project Overview
Raspberry Pi + VS Code Remote SSH: In this tutorial, you configure Visual Studio Code with the Remote - SSH extension so you can edit files on your Raspberry Pi remotely through VS Code (instead of editing only through a terminal).
This builds on Part 1 (linked above) where you SSH into your Raspberry Pi and confirm you have the correct username and IP address.
- Time: 10 to 20 minutes
- Skill level: Beginner
- What you will build: A working VS Code Remote SSH connection for editing Raspberry Pi files from your computer
Parts List
From ShillehTek
- None required for this software-only setup
External
- Raspberry Pi with SSH enabled (see Part 1 video above)
- A computer (Windows, macOS, or Linux) running Visual Studio Code
- Visual Studio Code (VS Code)
- VS Code extension: Remote - SSH
- Raspberry Pi username and IP address
Note: If you do not know your Raspberry Pi username or IP address yet, refer to Part 1 (linked in the video section) before continuing.
Step-by-Step Guide
Step 1 - Download and install VS Code
Goal: Install Visual Studio Code on your local computer.
What to do: Download VS Code for free from the official site and install it:
https://code.visualstudio.com/download
Expected result: VS Code opens successfully on your computer.
Step 2 - Install the Remote - SSH extension
Goal: Add SSH support inside VS Code.
What to do: In VS Code, open the Extensions tab and search for Remote - SSH. Install the extension.
After it installs, select the blue icon in the bottom-left corner of the VS Code window.
Expected result: You can access Remote SSH commands from the bottom-left remote indicator.
Step 3 - Add your Raspberry Pi as an SSH host
Goal: Save a reusable SSH connection entry in VS Code.
What to do: From the Remote SSH menu, choose Connect to Host and then Add SSH Host. Enter this command (replace placeholders with your details):
Code:
ssh <Raspberry Pi Username>@<Raspberry Pi IP Address>
Press Enter when it prompts you to add it to the SSH config file.
Expected result: Your Raspberry Pi shows up as a saved host you can select in VS Code.
Step 4 - Connect and edit Raspberry Pi files in VS Code
Goal: Use VS Code to browse and edit files on the Raspberry Pi over SSH.
What to do: Select the host you added and connect. Once connected, open folders and edit files on the Raspberry Pi directly in VS Code.
Expected result: You can edit Raspberry Pi files from VS Code with a full UI, instead of working only from a shell.
Conclusion
You set up VS Code Remote - SSH for a Raspberry Pi so you can edit files remotely over SSH using VS Code’s interface and tooling. This makes Raspberry Pi development easier than working only inside a terminal.
Want the exact parts for your next Raspberry Pi build? Grab what you need from ShillehTek.com. If you want help setting up a remote dev workflow or customizing a Raspberry Pi project for your product, check out our IoT consulting services.


