Develop with Visual Studio Code via SSH
This guide will walk you through how to connect your development board (e.g. RB3 Gen-2 running Ubuntu) from your local computer using Visual Studio Code (VS Code) over SSH.
Prerequsites
The board has an updated Ubuntu image:
The board is connected to the internet.
Step 1 — Enable SSH / Locate IP Address
Connect to the device using a serial port, see Qualcomm docs: Configuring Ubuntu on the device (docs for RB3, but same apply to Rubik Pi 3).
Log in over the console, the default username is
ubuntu
and the default password is alsoubuntu
.Ensure the network is set up (Ethernet or Wi-Fi).
Find the board’s IP address. For example via:
sudo apt update && sudo apt install -y net-tools ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1' # 192.168.1.253
Step 2 — Install / Enable Remote ‑ SSH Extension in VS Code
On your local machine:
Open VS Code.
Go to Extensions.
Search for Remote ‑ SSH (by Microsoft) and install it.
Step 3 — Add the Board as an SSH Host in VS Code
Open the Command Palette in VS Code (F1 or Command+Shift+P on macOS, Ctrl+Shift+P on Windows/Linux).
Run
Remote‑SSH: Add New SSH Host...
Enter the SSH connection string, e.g.:
ubuntu@board-ip-address
Optional: If you are using a key, you can include the identity file:
ssh -i ~/.ssh/id_rsa_board user@board-ip-address
Choose which SSH config file to use (usually
~/.ssh/config
). VS Code will insert an entry for your board.Example config snippet:
Host my-board HostName 192.168.1.100 User ubuntu IdentityFile ~/.ssh/id_rsa_board
Step 4 — Connect to the Board via VS Code
In VS Code, open the Command Palette again →
Remote‑SSH: Connect to Host...
Select your host (e.g.
ubuntu@board-ip-address
or the name you gave in the SSH config).If prompted, select the platform of the remote.
After a short wait, VS Code will install the VS Code Server onto the board automatically. The status will be shown in the lower status bar.
Once connected, you can use File → Open Folder... to browse files on the board, open terminals (these will run on the board), and install extensions on the remote host as needed.
Troubleshooting
VS Code Server uses excessive RAM: Running many VS Code extensions on the remote host can consume large amounts of memory, leading to out-of-memory (OOM) errors and random network dropouts
Solution: Disable or selectively enable extensions on the remote host to reduce memory usage
SSH connection fails: Board not reachable / wrong IP / SSH not running
Solution: Check network, run
ssh ubuntu@IP
from terminal, verify the board’s network tools are updated and working over serial connection e.g.sudo apt update && sudo apt install -y net-tools ifconfig
Host platform detection incorrect: VS Code guesses wrong (e.g. ARM vs x86)
Solution: Manually set
remote.SSH.remotePlatform
in VS Code settings
Optional: Use SSH Key‑Based Authentication
To avoid typing passwords:
On your local machine, generate an SSH keypair if you don’t have one:
ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsa_board
Copy the public key to your board:
ssh-copy-id -i ~/.ssh/id_rsa_board.pub user@board-ip-address
Confirm that you can SSH in without a password.
Update your VS Code SSH configuration to refer to this key (as in Step 3).
Last updated