VSC remote development

ssh config:

Host xxx
  HostName xxx
  User xxx
  ForwardAgent yes
  IdentityFile xxx

IdentityFile 不是合成的ppk文件,是私钥,不要搞成公钥,后缀不带pub

settings.json相关配置

"remote.SSH.showLoginTerminal": true,
"remote.SSH.configFile": "C:\\Users\\xxx\\.ssh\\config",
"remote.SSH.useLocalServer": false,
"remote.autoForwardPorts": false,
"remote.SSH.remotePlatform": {
"xxx": "linux"
},
"remote.SSH.path": "D:\\Program Files\\Git\\usr\\bin\\ssh.exe"

注意:

  1. xxx要改成自己的实际server名称
  2. 要配置ssh的路径,否则ssh命令会失败提示“An SSH installation couldn't be found”
  3. 左下角绿色了,就标识成功,终端会显示“6b8492386046: end”类似字样
  4. 过程中提示git版本过低,提示的是服务器端的版本,根据需要升级,不是强制升级

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注