Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Remote-SSH 1.0.51/1.0.52 treats encoded ssh-remote authority as raw hostname
Describe the Bug
Cursor Remote-SSH sometimes stores remote authorities as hex-encoded JSON, for example:
7b22686f73744e616d65223a22726f6f74406465766d616368696e65227d
This decodes to:
{"hostName":"root@devmachine"}
But anysphere.remote-ssh does not decode it before connecting. It directly runs:
ssh -T -D <port> 7b22686f73744e616d65223a22726f6f74406465766d616368696e65227d bash --login -c bash
So OpenSSH fails with:
ssh: Could not resolve hostname 7b22686f...: nodename nor servname provided, or not known
Expected Behavior
Remote-SSH should decode the authority:
ssh-remote+7b22686f... -> {"hostName":"root@devmachine"} -> root@devmachine
and then invoke SSH with the decoded host:
ssh root@devmachine
The window title should also show:
[SSH: root@devmachine]
not:
[SSH: 7b22686f...]
Actual Behavior
Remote-SSH passes the encoded hex string directly to ssh, causing connection failure.
If I add a workaround alias in ~/.ssh/config, the connection works, but Cursor still displays the ugly hex string in the title bar:
autoshow_omni [SSH: 7b22686f...]
Repro Cases
I reproduced this with several previously opened remote workspaces:
7b22686f73744e616d65223a22726f6f74406465766d616368696e65227d
=> {"hostName":"root@devmachine"}
7b22686f73744e616d65223a22726f6f7440746563682d7265706f72742d6368696e61227d
=> {"hostName":"root@tech-report-china"}
7b22686f73744e616d65223a22726f6f744064656d6f686f7374227d
=> {"hostName":"root@demohost"}
In all cases, Cursor tries to run SSH against the encoded string itself.
Logs
Example:
[info] Resolving ssh remote authority '7b22686f73744e616d65223a22726f6f74406465766d616368696e65227d'
(Unparsed 'ssh-remote+7b22686f73744e616d65223a22726f6f74406465766d616368696e65227d')
[info] Launching SSH server via shell with command:
cat ".../cursor_remote_install_....sh" | ssh -T -D 56246 7b22686f73744e616d65223a22726f6f74406465766d616368696e65227d bash --login -c bash
[error] ssh: Could not resolve hostname 7b22686f73744e616d65223a22726f6f74406465766d616368696e65227d
Another example with anysphere.remote-ssh-1.0.52:
[info] Resolving ssh remote authority '7b22686f73744e616d65223a22726f6f7440746563682d7265706f72742d6368696e61227d'
(Unparsed 'ssh-remote+7b22686f73744e616d65223a22726f6f7440746563682d7265706f72742d6368696e61227d')
[info] Launching SSH server via shell with command:
cat ".../cursor_remote_install_....sh" | ssh -T -D 55829 7b22686f73744e616d65223a22726f6f7440746563682d7265706f72742d6368696e61227d bash --login -c bash
[error] ssh: Could not resolve hostname 7b22686f73744e616d65223a22726f6f7440746563682d7265706f72742d6368696e61227d
Environment
- OS: macOS Darwin 24.6.0
- Cursor Remote-SSH: reproduced with
anysphere.remote-ssh-1.0.51andanysphere.remote-ssh-1.0.52 - SSH config aliases such as
devmachine,demohost, andtech-report-chinawork correctly from the terminal
Workaround
Adding a fake SSH alias for the encoded authority makes the connection work:
Host 7b22686f73744e616d65223a22726f6f74406465766d616368696e65227d
HostName ip
IdentityFile
But this is only a workaround and causes the title bar to display the encoded hex hostname.
Steps to Reproduce
.
Operating System
MacOS
Version Information
Remote-SSH 1.0.51/1.0.52
Does this stop you from using Cursor
No - Cursor works, but with this issue