Skip to content

Unexpected differences between remote.SSH.useLocalServer false and true #4492

@bersbersbers

Description

@bersbersbers
  • VSCode Version: 1.53.2
  • Local OS Version: Windows 10
  • Remote OS Version: OpenSUSE Leap 15.2
  • Remote Extension/Connection Type: SSH

"remote.SSH.useLocalServer": false works fine, so I'd expect true to also work. Here's what different:

  1. My local username is Firstname, my remote username ist lastname. I have my user lastname set in my SSH config, so I can connect using ssh hostname. However, the local server seems to connect to Firstname@host, which is incorrect. This can be worked around by connecting to lastname@host in VS Code, but that should not be necessary.

  2. I usually set no specific SSH path in VS Code - global PATH is sufficient. However, with local server, it does not seem to like my default ssh.exe on the PATH and uses the Git one instead:

[06:38:55.343] Checking ssh with "ssh -V"
[06:38:55.402] > OpenSSH_for_Windows_8.1p1, LibreSSL 2.9.2

[06:38:55.407] Checking ssh with "C:\WINDOWS\System32\OpenSSH\ssh.exe -V"
[06:38:55.409] Got error from ssh: spawn C:\WINDOWS\System32\OpenSSH\ssh.exe ENOENT
[06:38:55.410] Checking ssh with "C:\Program Files\Git\usr\bin\ssh.exe -V"
[06:38:55.464] > OpenSSH_8.4p1, OpenSSL 1.1.1i  8 Dec 2020

[06:38:55.476] Using SSH config file "C:\Users\Firstname\.ssh\config"

I don't have an agent configured for my Git ssh.exe (I never asked for that to be installed), so it does not connect. This can be worked around using "remote.SSH.path": "C:\\Tools\\OpenSSH\\ssh.exe", but that should not be necessary.

TLDR: "remote.SSH.useLocalServer": true can lead to wrong username and ssh executable being used when taking a working setup with "remote.SSH.useLocalServer": false as a baseline.

Metadata

Metadata

Assignees

No one assigned

    Labels

    sshIssue in vscode-remote SSH

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions