Vscode远程连接Linux服务器

Vscode远程连接Linux服务器

作者: yym439 时间: 2021-12-31

一、 Vscode远程连接Linux服务器

  1. 安装Remote-SSH插件

  2. ctrl+shift+p —- 打开首选项 —– “remote.SSH.path”: “E:\user\SoftTool\Git\usr\bin\ssh.exe”

  3. ctrl+shift+p —- Open SSH Configuration File —- 设置端口号: Port 10022

  4. CTRL + SHIFT + ~ :可以调出终端

  5. 远程连接上插件不能用,双击插件安装到远程服务器就可

二、解决报错

  1. An SSH installation couldn‘t be found
    • 需要设置ssh环境变量
  2. Resolver error: Error
    • C:\Users\user_name.ssh\known_hosts 删除掉对应的认证信息
    • Resolver error: Error
    • Remote-SSH:kill VS Code Server on Host
    • 重新连接即可