VOOZH about

URL: https://www.digitalocean.com/community/tutorials/how-to-use-visual-studio-code-for-remote-development-via-the-remote-ssh-plugin?comment=171490

⇱ How To Use Visual Studio Code for Remote Development via the Remote-SSH Plugin | DigitalOcean


How To Use Visual Studio Code for Remote Development via the Remote-SSH Plugin

Updated on August 5, 2021
πŸ‘ How To Use Visual Studio Code for Remote Development via the Remote-SSH Plugin

Introduction

Visual Studio Code is a popular Integrated Developer Environment (IDE) for developers. Its large selection of plugins, minimal design, and cross-platform support make it a great choice for developers of all levels. This tutorial focuses on using the Remote-SSH plugin to enable remote software development. With this plugin you can edit files on your local workstation, but run development tasks such as program execution, unit tests, or static analysis on a remote server.

There are many reasons why this may be beneficial to you. For example, you may have a Windows workstation and want to develop on Windows, but your code will eventually run on Linux. You may need more RAM or processing power than your current machine has available, or you want to keep code off of your personal machine due to a company policy, or the desire to keep your workstation prestine.

In this tutorial, you’ll enable the Remote-SSH plugin, configure Visual Studio Code to execute code on the remote server, and execute code from your local Visual Studio Code installation on the remote server.

Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.

Learn more about our products

About the author(s)

πŸ‘ Mason Egger
Mason Egger
Author
Developer Advocate
See author profile

Mason is currently a Sr. Developer Advocate at DigitalOcean who specializes in cloud infrastructure, distributed systems, and Python.

Managed the Write for DOnations program, wrote and edited community articles, and makes things on the Internet. Expertise in DevOps areas including Linux, Ubuntu, Debian, and more.

Still looking for an answer?

Was this helpful?

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Be aware that though the RemoteSSH plugin will install into the telemetry-free VSC fork VSCodium, it will not work due to licensing issues. See https://github.com/VSCodium/vscodium/issues/196

Great post!

I’m a big fan of the remote experience with VS Code, I’ve been using it for a while and like it more and more. I wrote an open source VS Code extension to do the same thing you describe + code synchronization for Kubernetes. Would love to hear what you think!

Just a tip for the Windows users out there, old habits die hard so you still see a lot of tutorials saying to use PuTTY, but since the April 2018 update Windows 10 has had OpenSSH included. In other words, no more need for PuTTY. See how to natively setup your SSH key here: https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_keymanagement

And of course Windows has had WSL for a few years too, so you could use that and just follow the Linux instructions for SSH key generation.

Thank you for this tutorial, however, I am having some issues getting key authentication working. I can access a local server using a username/password combination but for some reason key authent. just does not work. The target server is Ubuntu 18.04.

I can access the server fine through PS when I specify the key file with β€œ-i”, so I know the key is correct, and -p as I also have to use a custom port to get through our cloud perimeter FW.

[08:20:09.621] > OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5 [08:20:09.626] Running script with connection command: ssh -T -D 64699 -p 8022 [correct IP] bash [08:20:09.638] Terminal shell path: C:\WINDOWS\System32\cmd.exe [08:20:10.059] > [08:20:10.060] Got some output, clearing connection timeout [08:20:10.488] > [user-here but not the one configured]@[correct IP]: Permission denied (publickey).

Any ideas on how I can progress this further before I open an issue on the project’s GitHub?

I currently use VSCode with an SSHFS plugin (which works perfectly) to modify files directly on the server, and then have a separate SSH session to execute the code, and was just trying to consolidate this into one tool.

PuTTY is not supported in VSCode, but this article mentions it is.

So, which is it?

This is amazing. Thank you!

algo a tener en cuenta es que se le puede cambiar el puerto de ssh entre hostname y user se le puede agregar port y el numero de puerto por ejemploHost my_remote_server HostName your_server_ip_or_hostname Port 24 User sammy IdentityFile /location/of/your/private/key

πŸ‘ Creative Commons
This work is licensed under a Creative Commons Attribution-NonCommercial- ShareAlike 4.0 International License.
  • Deploy on DigitalOcean

    Click below to sign up for DigitalOcean's virtual machines, Databases, and AIML products.

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and AI-native businesses

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow β€” whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Β© 2026 DigitalOcean, LLC.Sitemap.
Dark mode is coming soon.