Simple set up to control your Linux OS with vscode


VSCode Remote ssh extension is useful for Linux users that want to be able to code on their local machine, but build and run code on a remote system. This allows for you to use local resources, like your favorite editor without being bogged down by the OS.

In this blog post I will show you how to set up vscode to be able to control your Linux OS through SSH.

vscode is a handy editor that allows to code in different languages and environments. One of its many features is the remote development with ssh.

It allows you to use a local copy of vscode to control a remote Linux OS.

You can find more information here:

https://code.visualstudio.com/docs/remote/ssh

So, I’ve been using Visual Studio Code for a little over a year now and have really fallen in love with it. I run both Windows and Linux machines, so the ability to remote into my linux machine from the comfort of vscode is very appealing. It also allows me to install extensions that are built for Linux but not windows, such as language support for some older languages like Erlang. In this post I will describe how you can set up your system to enable this functionality.

First off, you’ll need to download the Remote Development extention pack. This pack contains three extensions: Remote – SSH, Remote – Containers, and Remote – WSL. You can find more information on each of these extension packs by going to their respective pages in the marketplace. For this blog we will only be covering Remote – SSH, but feel free to check out the others if they interest you!

Once you have the extension pack installed (or if it’s already installed) hit Ctrl+P then type “Remote-SSH” and select “Remote-SSH: Open Configuration File…”. This will open a user settings file where you can configure your remote connections.

You’ll notice there is an example connection listed in your user settings file that looks something

If you’re a developer who uses Visual Studio Code, you might have come across the Remote Development extension pack. This extension pack allows you to open any folder in a container, on a remote machine, or in the Windows Subsystem for Linux (WSL) and take advantage of VS Code’s full feature set.

In this article I will detail how to setup a remote ssh connection to your linux machine. This will allow you to edit your code with vscode on a remote server or VM.

Note: There is an older version of this extension available but it is no longer supported and has been deprecated.

If you have been in the web developer space for a while, you must have come across Visual Studio Code. Over the few years, it has grown in popularity and currently sits as the most popular text editor according to Stackoverflow’s developer survey. I use it because of its extensibility and customizability.

What is remote ssh?

Remote development over ssh is a feature added to VSCode that allows the user to develop on a remote machine (in this case your linux machine) using VSCode on your local windows/mac/linux machine. This removes the need for running an X server and is much more performant compared to using other solutions like VNC and X2go.

I recently purchased a Raspberry PI 4 and wanted to get my VSCode setup to control the device. I have used SSH before in order to control other devices, but this time I wanted to be able to use the full power of VScode, with IntelliSense, running bash commands and all the other cool stuff that comes with VSCode. Turns out it was a lot easier than I thought!

The main hurdle was that I had never configured the PI for remote access. Here are the steps I followed to get remote access from my Mac OS up and running:

Download Visual Studio Code Insiders – https://code.visualstudio.com/insiders/

Download Raspbian Buster Lite – https://www.raspberrypi.org/downloads/raspbian/

Burn Raspbian Buster Lite image to SD card using Balena Etcher – https://www.balena.io/etcher/

Mount SD card on Mac and create empty file called “ssh” in the root directory of the card (this enables ssh on first boot)

Unmount the SD card and put it into your Pi

Connect HDMI monitor, keyboard, mouse, lan cable and power supply to

One of the most useful features of VSCode is the ability to run and edit files on remote systems. This way you can use a simple text editor like VSCode to work on projects that are running on another machine. This is especially useful for managing Linux servers, as VSCode is a much more user-friendly text editor than nano or vim.

In order to use VSCode remote ssh, you must first have VScode installed locally, and an ssh server running on the remote machine. You will also need the Remote SSH extension for Visual Studio Code.

First you will need to create a public and private key pair to securely connect from your local machine to the remote server. This can be done via Terminal with the following command:

ssh-keygen -t rsa -b 4096 -C “your_email@example.com”

You can substitute your email address for “your_email@example.com”.

This will create a new ssh key, using the provided email address as a label. When you’re prompted to “Enter a file in which to save the key,” press Enter. This accepts the default file location. Next, you’ll be asked to enter a passphrase (this step is


Leave a Reply

Your email address will not be published. Required fields are marked *