Hosts with %h in the HostName field work when connecting manually but don’t appear in the “Connect to Host” dropdown in anysphere.remote-ssh

Describe the Bug

My ~/.ssh/config has some entries where HostName uses %h. Only the first HostName in the list shows up in the “Connect to Host” dropdown, but if I can still connect if I type the other HostNames.

Steps to Reproduce

Use

Host a b c
  HostName %h.example.com

When you type Connect to Host, you will only see a, but if you type b and enter, you can still connect.

Expected Behavior

The dropdown should show all of the hosts, since it’s valid in Mac’s OpenSSH. Microsoft’s extension displays the Hosts properly.

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.2.4
VSCode Version: 1.99.3
Commit: a8e95743c5268be73767c46944a71f4465d05c90
Date: 2025-07-10T16:53:59.659Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.5.0

Additional Information

anysphere.remote-ssh version 1.0.21

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, tagging in @ravirahman as our resident expert on this!

Hi @randomuser21, thank you for this bug report. We are looking into it.