VSCode Remote-SSH with Azure

This post has been republished via RSS; it originally appeared at: New blog articles in Microsoft Tech Community.

With Visual Studio Code (VSCode) you can connect to a Linux VM (WSL, container or remote via SSH) and it will look and feel like it is running locally. It creates a tunnel to the remote machine / VM, connects the terminal, shows the folder and much more. It is so great that you typically cannot spot the difference.

The screenshot below is taken from a windows computer that is connected to a VM running on Azure. It shows the local file system of the remote machine, has syntax highlighting of the terraform code on the right, and shows the remote bash of the system. Even the extensions are running as if they would run locally.




The approach has several benefits compared to running VSCode locally.



If you develop and must download and upload huge files and need very good internet, then developing remotely in this full-featured development environment can be of great help. Azure VMs have great internet connection, uploading large files from there is very performant. If the target service is also an Azure service, then it is even faster. Pushing a docker image to Azure Container registry is done in seconds.



Azure has 284 different VM sizes (more are being added all the times!), combinations of CPU and RAM. You need a faster CPU? More memory? More IOPS? A few clicks in the portal (or a script) and you have the developer machine that gets the job done.


Stability & Runtime

Even with a slow and unreliable conference Wi-Fi there is a good chance that an SSH connection can be established. Same applies to traveling. If you must run a script that runs for several minutes or hours, you do not want to depend on your local connection. With the remote-ssh connection you have the best of both worlds, a great local development experience and the stability of the remote runtime.


Tipps & Tricks

Do you use this setup already? Do you have other requirements to use such a setup? Then share them in the comments!


Hope it helps,

REMEMBER: these articles are REPUBLISHED. Your best bet to get a reply is to follow the link at the top of the post to the ORIGINAL post! BUT you're more than welcome to start discussions here:

This site uses Akismet to reduce spam. Learn how your comment data is processed.