Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use VSCode explorer with remote server (using SSH)

I need to code / edit files in a remote server using SSH, and I would like to access it with VSCode.

I'm on Windows 10, using "Git Bash" as integrated terminal in VSCode, which means I can connect to the server using VSCode's terminal.
What I'm missing is a way to open files from the terminal to the editor, and even better - interacting with the files using the explorer.

How can this be done?

like image 533
galah92 Avatar asked Nov 08 '17 12:11

galah92


1 Answers

Since the May, 2nd 2019 announcement of "Remote Development with VS Code", you now officially have:

Visual Studio Code Remote - SSH

https://microsoft.github.io/vscode-remote-release/images/ssh-readme.gif

The Remote - SSH extension lets you use any remote machine with a SSH server as your development environment.
Since nearly every desktop and server operating system has a SSH server that can be configured, the extension can greatly simplify development and troubleshooting in a wide variety of situations.

You can:

  • Develop on the same operating system you deploy to or use larger, faster, or more specialized hardware than your local machine.
  • Quickly swap between different, remote development environments and safely make updates without worrying about impacting your local machine.
  • Access an existing development environment from multiple machines or locations.
  • Debug an application running somewhere else such as a customer site or in the cloud.

Q1 2020: VSCode 1.42 improves support for Windows servers, including automatic OS detection.

like image 178
VonC Avatar answered Sep 23 '22 11:09

VonC