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:

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

阅读 444

Fell asleep when the light is on

4 声望
0 粉丝
0 条评论

Fell asleep when the light is on

4 声望
0 粉丝