最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

openssh - VS Code fails to ssh into a remote Windows computer running msys2 - Stack Overflow

programmeradmin2浏览0评论

I'm trying to ssh into a remote Windows computer with vscode. I'm able to ssh into that computer with PuTTY and MobaXterm but not from vscode. I've added the following to my settings.json based on solutions on Stack and other sites.

"terminal.integrated.profiles.windows": {
    "PowerShell": {
        "source": "PowerShell",
        "icon": "terminal-powershell"
    },
    "Command Prompt": {
        "path": [
            "${env:windir}\\Sysnative\\cmd.exe",
            "${env:windir}\\System32\\cmd.exe"
        ],
        "args": [],
        "icon": "terminal-cmd"
    },
    "Git Bash": {
        "source": "Git Bash"
    },
    "MSYS2_UCRT64": {
        "path": "C:\\msys64\\usr\\bin\\bash.exe",
        "args": [
          "--login",
          "-i"
        ],
        "env": {
          "MSYSTEM": "UCRT64",
          "CHERE_INVOKING": "1",
        }
    }
},
"terminal.integrated.defaultProfile.windows": "MSYS2_UCRT64"

When I attempt to connect, vscode displays the following in the Output window:

Running script with connection command: "C:\WINDOWS\System32\OpenSSH\ssh.exe" -T -D 11516 "MSYS2" powershell

where MSYS2 is my ssh config entry for the remote computer. The info is correct.

It looks like the following is the only error I'm getting

[10:42:39.473] gps : Cannot find a process with the process identifier 16664. At line:9 char:6

  • if ((gps -Id $u_).Name -eq 'sshd') {
  •  ~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (16664:Int32) [Get-Process], ProceessCommandException
    • FullyQualifiedErrorId : NoProcessFoundForGivenId,Microsoft.PowerShell.Commmands.GetProcessCommand

Things I've tried

  1. Upgraded the remote extensions to the latest versions
  2. Downgraded the remote extensions to previous versions
  3. Upgraded vscode to the latest version

Does anyone know why ssh isn't working?

发布评论

评论列表(0)

  1. 暂无评论