Setting Up Vscode For Remote Servers

I’m not going to go deep into why you would want to develop in a remote environment. I was going to at first, but I feel like that’s a different conversation. In this article I’m just going to dive into how you can setup vscode (Visual Studio Code) to connect to a remote development environment and some hypotheticals on how this can potentially improve your personal workflow.

Note: Since this is a proper how-to, and the first I’m writing on this site, I’m going to set a precedent for how these articles flow with this one. Please be aware that I am currently volunteering you as research for this site and any feedback you may have for this format would be highly appreciated.

List of Requirements

  • Visual Studio Code
  • Remote - SSH Extension for Visual Studio Code
  • A Remote Server with SSH Installed (preferably a Linux environment, as this is what I will demonstrate with)
  • A Connection to the Remote Server (I am using Tailscale to tunnel to the remote server here)

Getting Started on VSCode

You’re going to need a local install of Visual Studio Code. This is probably the most important part.

Regardless of your system, you should install Visual Studio Code from the official website as a package. Once you have it downloaded, you can install it by going through the typical install process on your OS for whatever executable or package format you downloaded.

Once Visual Studio Code is installed, open it up and begin installing the “Remote - SSH” extension. You can do this by clicking on the Extensions icon on the left-side of the window. On Mac, the keyboard shortcut is Shift+Cmd+X. Installing this extension will also install “Remote - SSH: Editing Configuration Files” and “Remote Explorer”. You will want these.

Setting Up Remote Server for SSH

I am going to explain the process for setting up a Linux environment with SSH installed. To demonstrate, I will run everything inside a container.

Built with Hugo
Theme Stack designed by Jimmy