microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.9k stars 29.52k forks source link

[bug] Remote-SSH cannot recognize `User` in ssh config file #226920

Open monagai opened 3 months ago

monagai commented 3 months ago

Does this issue occur when all extensions are disabled?: Yes/No

Steps to Reproduce:

  1. Set .ssh config fille as fig1.
  2. connect ssh
  3. In a window requesting my password, different user name is set. (yellow box in fig2) fog1 fig2
joshspicer commented 6 days ago

What happens if you do ssh <name_of_host> in your terminal?

Can you check other default locations for configuration files to see if there is any conflicting configuration there? It would be easy to accidentally set configuration in another file via our UI:

Image

Also, please try changing the identifier after Host to something other than the IP address (e.g name it my_remote_host). Your local ssh program is "in charge" of connecting to the remote, we're just pigging backing off that configuration - perhaps its connecting directly to that IP address (and using your local username)