我需要使用 SSH 在远程服务器中编码/编辑文件,我想使用 VSCode 访问它。
我在 Windows 10 上,在 VSCode 中使用“Git Bash”作为集成终端,这意味着我可以使用 VSCode 的终端连接到服务器。
我缺少的是一种将文件从终端打开到编辑器的方法,甚至更好 - 使用资源管理器与文件进行交互。
如何才能做到这一点?
最佳答案
自 2019 年 5 月 2 日发布“Remote Development with VS Code”以来,您现在正式拥有:
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.
2020 年第一季度:VSCode 1.42改进了对 Windows 服务器的支持,包括自动操作系统检测。
关于visual-studio-code - 在远程服务器上使用 VSCode 资源管理器(使用 SSH),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47179532/