Windows VS Code remote-SSH ubuntu
文章目录
- Download extension
Remote-SSHin 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 Fileto C:\Users\root\.ssh\config
Everything is done.
Enjoy your conding with Remote.SSH

评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论