Windows VS Code remote-SSH ubuntu

Posted CTi_

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Windows VS Code remote-SSH ubuntu相关的知识,希望对你有一定的参考价值。

  1. Download extension Remote-SSH in VS Code.
  2. Press any button with what you think that you can connect the server.
  3. Open the ssh config file, usually it is in C:\\Users\\<username>\\.ssh\\<config file>
  4. Edit the file by the following format:
Host x.x.x.x:xxxx
    User root
    HostName x.x.x.x:xxxx
    IdentityFile C:\\Users\\you\\.ssh\\key
  1. The process should be trival... However: https://github.com/microsoft/...

VS Code connect the server with the local username instead of the username specified in the config file!
What you need to do is creating a file with the name of the username used to connect to the server under C:\\Users. e.g. C:\\Users\\root if you use root to connect to your server. Then create .ssh\\<config file> under your new directory. Then you have C:\\Users\\root\\.ssh\\config to set up your ssh configuration.

Go to VS Code Setting, set the path of Remote.SSH config Fileto C:\\Users\\root\\.ssh\\config

Everything is done.
Enjoy your conding with Remote.SSH

以上是关于Windows VS Code remote-SSH ubuntu的主要内容,如果未能解决你的问题,请参考以下文章

VS code 使用 Remote-SSH 进行python远程开发

windows vs code 配置调试php

Windows VS Code remote-SSH ubuntu

Windows 10 搭建 VS code 开发环境

使用VS Code配合Remote Development插件连接远程服务器(Mac/Linux+Windows) | Using VS Code with Remote Development Co

超实用VS Code for Windows快捷键