Skip to content

Remote-SSH no longer shows hostname in ssh config but IP address when connected #238025

Closed
@renkun-ken

Description

@renkun-ken

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

  • VS Code Version: 1.96.3
  • OS Version: macOS 15.2

Steps to Reproduce:

  1. My ssh config at ~/.ssh/config contains a number of host entries with names like the following:
Host server-01
  HostName 10.35.135.15
  1. In VSCode, choose Connect to Host. The list of remote hosts correctly displays the hostnames rather than IPs (as always).
  2. Choose a host (e.g. server-01), then suddenly it asks me the remote OS platform (linux, macOS, windows) of the IP (10.35.135.15) rather than the hostname server-01. This is not ordinary because server-01 is already configured in remote.SSH.remotePlatform in settings.json. I choose linux here.
  3. Then the connection is established to the IP. All places that previously displayed the hostname now shows the IP (status bar, title bar, etc.), which is quite annoying when I have many VSCode windows open since I cannot tell which I should switch to by looking at the IP.

This happens just suddenly and I'm not sure if I'm missing something.

Activity

Kaauw

Kaauw commented on Jan 16, 2025

@Kaauw

I confirm the issue on my setup

vscode : 1.96.3
windows 11 24H2

In addition, when having an ssh key, vscode doesn't use it and ask for the password instead. It doesn't have a look into the user/.ssh/config

Host <name>
    HostName <IP>
    User <username>
    IdentityFile ~/.ssh/id_rsa
renkun-ken

renkun-ken commented on Jan 16, 2025

@renkun-ken
Author

Looks like this has been fixed in 1.96.4. Thanks!

locked and limited conversation to collaborators on Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Remote-SSH no longer shows hostname in ssh config but IP address when connected · Issue #238025 · microsoft/vscode