Windows VS Code remote-SSH ubuntu
- 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
推荐阅读
WSL2中cargo使用代理
在WSL使用Cargo时,会有需要用到外网的情况。假设我们在windows开了一个端口为10809的HTTP代理。我们的目标是让WSL中的cargo build使用到这个代理。
CTi_阅读 1.2k
VSCode 格式化哲学
当我们说「团队需要统一的代码样式」,大家都没有什么反对意见;但当问题变为「统一成什么样式?」时,大家的声音就嘈杂了起来。人们对于特定的编码方式很抵触,没有人喜欢花时间这样写代码,没人愿意接受别人的...
Cheri赞 2阅读 612
openSSH升级公钥失效Permission denied (publickey)解决方案
背景centos系统升级openSSH后,服务器上无法再拉取代码,报错如下:原因服务器重新安装SSH后公钥改变,需要重新安装ssh-keygen -t rsa -C "邮箱地址"生成公钥,删除gitlab原有公钥,但是git pull依然报错如下:依...
兰俊秋雨赞 1阅读 1.2k
VS Code For Web 深入浅出 -- Server 模块设计篇
在了解了 VS Code 的通信机制后,我们可以着手分析 VS Code Server 中各模块的实现以及设计思路了。<!-- more -->VSCode Server 模块设计通过之前的介绍我们可以了解到,VS Code 的能力是前后端分离的,这...
Duang赞 1阅读 1.5k
本地Linux通过SSH服务连接登录远程Linux服务器
本机Linux通过SSH服务连接登录远程Linux服务器查看IP:方式1: ifconfig方式2: ip addr登录命令格式: ssh 远程服务器用户名@远程服务器IP命令启动ssh服务: {代码...} 侦听端口(一般为22): netstat -na | grep 22 使...
DEFAULT赞 1阅读 576
VSCode For Web 深入浅出 -- 依赖注入设计
在阅读 VSCode 代码的过程中,我们会发现每一个模块中都有大量装饰器的使用,用来装饰模块以及其中依赖的模块变量。这样做的目的是什么呢?在这一篇中我们来详细分析一下。
Duang赞 2阅读 1.6k
windows 批处理bat,设置定时关机
文章来源:[链接] {代码...}
jigsaw赞 2阅读 3.2k
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。