How to configure remote access in VS Code

Developing in a remote system can be quite challenging.

Fernando Souza
Vacatronics

--

Photo by Kevin Ku on Unsplash

Anyone that once developed for a remote system (such as Raspberry Pi or AWS) had to use a text editor to edit a piece of code in some moment. If you have used nano or vi you know what I’m talking about. Or have edited them on your computer and copied them over the internet just to find that you have a typo.

But there’s a solution. We can configure the VS Code and access our system remotely via SSH. In this article I will show you how.

Requirements

This tutorial was tested using the following systems:

  • A Raspberry Pi Model 3B+ with Raspbian installed. Make sure it’s with SSH enabled. This will be our remote system.
  • A Ubuntu 19.10 notebook. This will be our home system.
  • VS Code version 1.45.1.

You can find how to install and configure the Raspbian here. And the VS Code can be installed using Snap.

Passwordless SSH

To avoid having to keep insert the password every time you want to access the RPi, we can configure an SSH key to make this automatically. To check if you already have a key in your computer, run the command:

--

--

Fernando Souza
Vacatronics

Enthusiast of programming, electronics, technology and beer, not necessarily in that order. BuyMeACoffee: buymeacoffee.com/ustropo