Remote development over SSH

This tutorial walks you through creating and connecting to a virtual machine (VM) on Azure using the Visual Studio Code Remote - SSH extension. You'll create a Node.js Express web app to show how you can edit and debug on a remote machine with VS Code just like you could if the source code was local.

Note: Your Linux VM can be hosted anywhere - on your local host, on premise, in Azure, or in any other cloud, as long as the chosen Linux distribution meets these prerequisites.

Prerequisites

To get started, you need to have done the following:

  1. Install an OpenSSH compatible SSH client (PuTTY is not supported).
  2. Install Visual Studio Code.
  3. Have an Azure subscription (If you don't have an Azure subscription, create a free account before you begin).

Install the extension

The Remote - SSH extension is used to connect to SSH hosts.

Install the Remote - SSH extension

Remote - SSH extension

Remote - SSH

With the Remote - SSH extension installed, you will see a new Status bar item at the far left.

Remote Status bar item

The Remote Status bar item can quickly show you in which context VS Code is running (local or remote) and clicking on the item will bring up the Remote - SSH commands.

Remote - SSH commands


I've installed the Remote - SSH extension