VS Code Remote SSH

What is SSH?

SSH, or the secure shell protocol, lets you access a remote computer or virtual machine securely over a network connection.

You can connect over SSH into another machine from Visual Studio Code and interact with files and folders anywhere on that remote filesystem. If you have an app located on a different computer, you could use SSH to connect to it and access your app, view its files, and even modify, run, and debug it.

You can also take advantage of any tools or dependencies installed on that remote machine. You could connect to remote machines very different than your local machine. For instance, they could have a different operating system, different tools installed, or much stronger computing power.

In the classroom, you might SSH into lab machines to access computers with certain dependencies required for an assignment (like a specific version of Python or a C++ compiler), a different operating system than your own, or source code or automatic tests pre-loaded from your professor.

Get started with SSH in VS Code

To get started with using SSH in VS Code, you'll need to download the Remote - SSH extension from the Extension Marketplace.

Remote SSH extension

Check out the following video to see an example of using Remote - SSH in action:

As demonstrated above, we can SSH into a more powerful virtual machine to greatly speed up the execution time of our programs.

Next steps

We also highly recommend checking out the step-by-step SSH tutorial.