- Download extension
Remote-SSH
in VS Code. - Press any button with what you think that you can connect the server.
- Open the ssh config file, usually it is in
C:\Users\<username>\.ssh\<config file>
- 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
- 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 File
to C:\Users\root\.ssh\config
Everything is done.
Enjoy your conding with Remote.SSH
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。