Post

ENG | Using VS Code as a Remote IDE via SSH

Harness the full potential of Visual Studio Code as a remote IDE for Linux development enabling you to code, debug, and manage your Linux projects from anywhere."

ENG | Using VS Code as a Remote IDE via SSH

Introduction

Ever wondered how you could seamlessly edit Linux files from your Windows environment? Well, you’re in luck. In this step-by-step guide, we’ll uncover the magic of Visual Studio Code’s Remote SSH feature that enables you to do just that - code on a remote machine as if it was right in front of you.

For those of you yearning to enhance your blogging workflow or those testing programs on Linux, this method not only brings tremendous convenience but also boosts your productivity.

Huge advantage over Remote Desktop is that network latency does not matter for editing and it reduces data transfered over mobile phone.

Prerequisites

Installation

Install Remote - SSH extension for visual studio.

Connect to remote SSH host (write ssh command when asked)

Save connection (to C:\Users\<your-username>\.ssh\config)

Click Open Config button to verify it

Does it seem ok?

Connect to remote host then ➡️

This will install vscode server on the remote host. It may take a few seconds.

Open your favorite folder

Done

Bonus … do you see Terminal in the main menu? Let’s open New Terminal.

Other cool stuff

Watch Network Chuck -=- you NEED to use VS Code RIGHT NOW!!: there’s even more, you can manage docker containers or run Python via extension on a remote machine.

  • I noticed you can drag and drop files to File Explorer in VS Code to copy them to and from a remote machine, which is also quite useful.
  • It’s possible to execute Python scripts remotely, so you can type pip3 install seaborn scipy opencv-python and have Python environment accesible from any place (note that seaborn installs numpy pandas pillow matplotlib as dependencies and these are extensions I use mostly)

This might be fun:

Remote container development with VS Code and Podman

This post is licensed under CC BY 4.0 by the author.