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

Fell asleep when the light is on

4 声望
0 粉丝
0 条评论
推荐阅读
WSL2中cargo使用代理
在WSL使用Cargo时,会有需要用到外网的情况。假设我们在windows开了一个端口为10809的HTTP代理。我们的目标是让WSL中的cargo build使用到这个代理。

CTi_阅读 1.3k

openSSH升级公钥失效Permission denied (publickey)解决方案
背景centos系统升级openSSH后,服务器上无法再拉取代码,报错如下:原因服务器重新安装SSH后公钥改变,需要重新安装ssh-keygen -t rsa -C "邮箱地址"生成公钥,删除gitlab原有公钥,但是git pull依然报错如下:依...

兰俊秋雨2阅读 1.5k

Python实现Windows弹出微信消息通知(可显示发送人和消息内容)
Mac微信是有一个消息通知的,这一点就挺好的,有时候根本不用点开开看就能看到消息内容。而Windows电脑版是没有这个消息通知的,只有右下角图标闪烁。

TANKING3阅读 3.8k评论 1

封面图
VBS 入门交互实战
VBS 是一种 Windows 脚本语言,全称是 Microsoft Visual Basic Script Editon,微软公司可视化 BASIC 脚本版

tiny极客2阅读 826评论 3

封面图
一行命令切换win11的右键菜单,改为win10风格
问题:升级到Win11后不喜欢新的右键菜单,因为需要两次击才能显示更多选项。网上找了一堆乱七八糟的办法,大部分都不能用:修改注册表用脚本修改注册表安装修改菜单的软件(太麻烦)这里介绍一种简单粗暴的,修改...

luckybo1阅读 737

minikube master 节点的 docker 用户的密码什么?
先看下 node 的 ip 地址 {代码...} 但是直接登录 docker node 会失败! {代码...} 查了一下,可以不用账号密码,而是密钥对登录 {代码...} 指定公钥地址,就可以了 {代码...} 参考:How do I ssh into the VM for ...

ponponon阅读 1.4k

手把手提高开发体验:dev-container
之前看过方应杭的一期工作流视频,讲他是如何配置开发环境的。讲真,这期视频给我一丝震撼,原来不用虚拟机也能在 linux 上开发,但是它的配置过于复杂,我想配置一套自己的一套开发环境

山头人汉波阅读 1.1k

Fell asleep when the light is on

4 声望
0 粉丝
宣传栏