Azure Virtual Machines for Visual Studio Code (Preview)
Create and manage Azure Virtual Machines directly from VS Code.
Sign up today for your free Azure account and receive 12 months of free popular services, $200 free credit and 25+ always free services 👉 Start Free.
- Download and install the Azure Virtual Machines extension for Visual Studio Code
- Once complete, you'll see an Azure icon in the Activity Bar
If your activity bar is hidden, you won't be able to access the extension. Show the Activity Bar by clicking View > Appearance > Show Activity Bar
- Sign in to your Azure Account by clicking Sign in to Azure
If you don't already have an Azure Account, click "Create a Free Azure Account" or you can try Azure for free
- View, create, delete, start, and stop Azure Virtual Machines
- Add SSH key to existing Azure Virtual Machines
Create a New Virtual Machine
Once you are signed in, you can create your Azure Virutal machine by clicking the "+" button or by right-clicking your subscription.
- Choose Create Virtual Machine
- Type a name for your VM. Alphanumeric characters are all valid.
- Type a passphrase or leave it empty for no passphrase.
For security reasons, it's highly recommended that you use a passphrase for your SSH key. It is what will be used to connect to your VM via SSH.
The VM will be Standard D2s V3 (2 CPU Cores & 8 GB of ram) with the image Ubuntu 18.04-LTS. An SSH key will be created and your SSH Config file (
~/.ssh/config) will be updated so you can immediately connect via SSH (
$ ssh vm-name) or using the Remote-SSH extension.
Add SSH key to existing Virtual Machine
If you have an existing VM that you would like to add your own SSH key too, you can do that by right-clicking the VM tree item, clicking Add SSH Key..., and selecting an existing SSH key. You can generate an SSH key using SSH Keygen if you don't have any keys on your system.
Your SSH Config (
~/.ssh/config) file will be updated so you can connect via SSH using
$ ssh vm-name.
Remote into Azure VM via SSH
VS Code collects usage data and sends it to Microsoft to help improve our products and services. Read our privacy statement to learn more. If you don’t wish to send usage data to Microsoft, you can set the
telemetry.enableTelemetry setting to
false. Learn more in our FAQ.