在远程服务器上使用 VSCode 资源管理器(使用 SSH) [英] Use VSCode explorer with remote server (using SSH)

查看:70
本文介绍了在远程服务器上使用 VSCode 资源管理器(使用 SSH)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用 SSH 在远程服务器中编码/编辑文件,我想使用 VSCode 访问它.

我使用的是 Windows 10,在 VSCode 中使用Git Bash"作为集成终端,这意味着我可以使用 VSCode 的终端连接到服务器.
我缺少的是一种从终端打开文件到编辑器的方法,甚至更好 - 使用资源管理器与文件交互.

如何做到这一点?

解决方案

自 2019 年 5 月 2 日发布

<块引用>

远程 - SSH 扩展允许您使用任何带有 SSH 服务器的远程机器作为您的开发环境.
由于几乎每个桌面和服务器操作系统都有可配置的 SSH 服务器,因此该扩展可以极大地简化各种情况下的开发和故障排除.

您可以:

  • 在您部署到的相同操作系统上开发,或者使用比本地机器更大、更快或更专业的硬件.
  • 在不同的远程开发环境之间快速切换并安全地进行更新,而不必担心影响您的本地机器.
  • 从多台机器或位置访问现有的开发环境.
  • 调试在其他地方(例如客户站点或云端)运行的应用程序.

<小时>

2020 年第一季度: 改进了对 Windows 服务器的支持,包括自动操作系统检测.

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?

解决方案

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

Visual Studio Code Remote - SSH

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.

这篇关于在远程服务器上使用 VSCode 资源管理器(使用 SSH)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆