How to SSH into HuggingFace Space

I’m trying to SSH into my HuggingFace Space using the Remote - SSH extension from Anysphere but the process is hanging (dies after 30 seconds). It works on VSCode, but I understand there are some differences between VS Code’s Remote - SSH extension and the one from Anysphere.

What I’ve tried:

  • Changing the prefix from “vscode” to “cursor” in the connect link (this step is necessary).
    • e.g. “cursor://vscode-remote/ssh-remote+<SPACE_NAME>@ssh.hf.space/home/user/app” instead of “vscode://vscode-remote/ssh-remote+<SPACE_NAME>@ssh.hf.space/home/user/app”
  • Increasing the timeout time (up to 5 minutes), still times out.
  • Playing around with additional Remote - SSH configurations in the settings.json (taken from VSCode extension settings)
    • all settings besides “connectTimeout” and “path” are greyed out with an “Unknown Configuration setting” message when hovered over. Are they even used in the Anysphere version?
    • "remote.SSH.connectTimeout": 30,
      "remote.SSH.useLocalServer": false,
      "remote.SSH.enableExecServer": true,
      "remote.SSH.useFlock": true,
      "remote.SSH.path": "ssh",
      
  • Confirming the Cursor server is being installed properly and is running on the HF Space
    • I SSH’d into the HF Space and confirmed that the processes were running with “ps aux | grep cursor” and that ~/.cursor-server was installed.

Still, I get this error (log level set to “Trace”):

2025-12-31 14:50:11.347 [info] Resolving ssh remote authority ‘<SPACE_NAME>@ssh.hf.space’ (Unparsed ‘ssh-remote+<SPACE_NAME>@ssh.hf.space’) (attempt #1)

2025-12-31 14:50:11.352 [info] SSH askpass server listening on /var/folders/ls/lk2x63852z1b7qh25yx5f3h40000gn/T/cursor-ssh-56t9dv/socket.sock

2025-12-31 14:50:11.352 [debug] hostname: ssh.hf.space, remote platform map: {“ssh.hf.space”:“linux”,“<SPACE_NAME>@localhost”:“linux”}

2025-12-31 14:50:11.353 [info] Using configured platform linux for remote host ssh.hf.space

2025-12-31 14:50:11.353 [debug] hostname: ssh.hf.space, remote server install map: {}

2025-12-31 14:50:11.353 [debug] hostname: ssh.hf.space, server port range map: {}

2025-12-31 14:50:11.353 [info] Using askpass script: /Users/landon/.cursor/extensions/anysphere.remote-ssh-1.0.36/dist/scripts/launchSSHAskpass.sh with javascript file /Users/landon/.cursor/extensions/anysphere.remote-ssh-1.0.36/dist/scripts/sshAskClient.js. Askpass handle: /var/folders/ls/lk2x63852z1b7qh25yx5f3h40000gn/T/cursor-ssh-56t9dv/socket.sock

2025-12-31 14:50:11.356 [info] Launching SSH server via shell with command: cat “/var/folders/ls/lk2x63852z1b7qh25yx5f3h40000gn/T/cursor_remote_install_bb27cc31-b979-4aa8-99c8-cd1ced44e4c5.sh” | ssh -T -D 50253 <SPACE_NAME>@ssh.hf.space bash --login -c bash

2025-12-31 14:50:11.356 [info] Establishing SSH connection: cat “/var/folders/ls/lk2x63852z1b7qh25yx5f3h40000gn/T/cursor_remote_install_bb27cc31-b979-4aa8-99c8-cd1ced44e4c5.sh” | ssh -T -D 50253 <SPACE_NAME>@ssh.hf.space bash --login -c bash

2025-12-31 14:50:11.357 [info] Started installation script. Waiting for it to finish…

2025-12-31 14:50:11.357 [info] Waiting for server to install. Timeout: 30000ms

2025-12-31 14:50:41.360 [error] Error installing server: Failed to install server within the timeout

2025-12-31 14:50:41.360 [info] Deleting local script /var/folders/ls/lk2x63852z1b7qh25yx5f3h40000gn/T/cursor_remote_install_bb27cc31-b979-4aa8-99c8-cd1ced44e4c5.sh

2025-12-31 14:50:41.362 [error] Error resolving SSH authority Failed to install server within the timeout

Has anybody ran into this issue and found a solution for it? It seems that at one point in time all you had to do was change the prefix to ‘cursor’ in the connect link, but now updates have made it more complicated…

Version: 2.2.44 (Universal)
VSCode Version: 1.105.1
Commit: 20adc1003928b0f1b99305dbaf845656ff81f5d0
Date: 2025-12-24T21:41:47.598Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 25.2.0

Hey, thanks for the report.

A few things to check:

  1. Timeout setting - In the logs I see Timeout: 30000ms, so the increased timeout may not have been applied. Add this to Cursor Settings (JSON), not VS Code settings:
"remote.SSH.connectTimeout": 300
  1. Clean cursor-server completely - You mentioned processes are running, but that’s actually the problem. On the HuggingFace Space, run:
pkill -9 -f cursor-server
rm -rf ~/.cursor-server /tmp/cursor-remote-lock.* /tmp/cursor-server-*.tar.gz
  1. Unknown Configuration settings - The VSCode Remote-SSH settings (useLocalServer, enableExecServer, useFlock) don’t apply to Anysphere Remote-SSH - that’s expected.

After cleaning, try reconnecting. Let me know if the issue persists.

Hi, I did those things and still get this error:

2026-01-01 13:21:38.418 [info] Resolving ssh remote authority ‘<SPACE_NAME>@ssh.hf.space’ (Unparsed ‘ssh-remote+<SPACE_NAME>@ssh.hf.space’) (attempt #1)

2026-01-01 13:21:38.422 [info] SSH askpass server listening on /var/folders/ls/lk2x63852z1b7qh25yx5f3h40000gn/T/cursor-ssh-LP1DgN/socket.sock

2026-01-01 13:21:38.423 [info] Using configured platform linux for remote host ssh.hf.space

2026-01-01 13:21:38.423 [info] Using askpass script: /Users/landon/.cursor/extensions/anysphere.remote-ssh-1.0.36/dist/scripts/launchSSHAskpass.sh with javascript file /Users/landon/.cursor/extensions/anysphere.remote-ssh-1.0.36/dist/scripts/sshAskClient.js. Askpass handle: /var/folders/ls/lk2x63852z1b7qh25yx5f3h40000gn/T/cursor-ssh-LP1DgN/socket.sock

2026-01-01 13:21:38.426 [info] Launching SSH server via shell with command: cat “/var/folders/ls/lk2x63852z1b7qh25yx5f3h40000gn/T/cursor_remote_install_e6225f02-b559-45ce-99f5-11e4e977f619.sh” | ssh -T -D 52960 <SPACE_NAME>@ssh.hf.space bash --login -c bash

2026-01-01 13:21:38.426 [info] Establishing SSH connection: cat “/var/folders/ls/lk2x63852z1b7qh25yx5f3h40000gn/T/cursor_remote_install_e6225f02-b559-45ce-99f5-11e4e977f619.sh” | ssh -T -D 52960 <SPACE_NAME>@ssh.hf.space bash --login -c bash

2026-01-01 13:21:38.426 [info] Started installation script. Waiting for it to finish…

2026-01-01 13:21:38.426 [info] Waiting for server to install. Timeout: 300000ms

2026-01-01 13:26:38.432 [error] Error installing server: Failed to install server within the timeout

2026-01-01 13:26:38.432 [info] Deleting local script /var/folders/ls/lk2x63852z1b7qh25yx5f3h40000gn/T/cursor_remote_install_e6225f02-b559-45ce-99f5-11e4e977f619.sh

2026-01-01 13:26:38.435 [error] Error resolving SSH authority Failed to install server within the timeout

As you can see the timeout is now 300000ms

To be clear, I am first killing/removing all of the Cursor files/processes (using the command you gave me). Then, once I try to connect via Cursor SSH, I can see in the HF space that the server has been installed again and is running almost immediately. The fact that I can see the server is installing and running almost immediately makes me think this is not an issue of Cursor not waiting long enough, but some other incompatibility.

I tried running the following command in my Mac terminal:

`printf ‘echo _PIPE_OK_\n’ | ssh -T <SPACE_NAME>@ssh.hf.space bash --login -c bash`

and the process just hangs.

In the remote ssh settings, can you change the log level to trace and see if that sheds more light on what the error is?

Setting the log level to trace is not much more informative, but here you go:

2026-01-02 16:31:04.959 [info] Resolving ssh remote authority ‘<SPACE_NAME>@ssh.hf.space’ (Unparsed ‘ssh-remote+<SPACE_NAME>@ssh.hf.space’) (attempt #1)

2026-01-02 16:31:04.964 [info] SSH askpass server listening on /var/folders/ls/lk2x63852z1b7qh25yx5f3h40000gn/T/cursor-ssh-Rc6Z0l/socket.sock

2026-01-02 16:31:04.964 [debug] hostname: ssh.hf.space, remote platform map: {“ssh.hf.space”:“linux”,“<SPACE_NAME>@localhost”:“linux”}

2026-01-02 16:31:04.964 [info] Using configured platform linux for remote host ssh.hf.space

2026-01-02 16:31:04.964 [debug] hostname: ssh.hf.space, remote server install map: {}

2026-01-02 16:31:04.964 [debug] hostname: ssh.hf.space, server port range map: {}

2026-01-02 16:31:04.965 [info] Using askpass script: /Users/landon/.cursor/extensions/anysphere.remote-ssh-1.0.36/dist/scripts/launchSSHAskpass.sh with javascript file /Users/landon/.cursor/extensions/anysphere.remote-ssh-1.0.36/dist/scripts/sshAskClient.js. Askpass handle: /var/folders/ls/lk2x63852z1b7qh25yx5f3h40000gn/T/cursor-ssh-Rc6Z0l/socket.sock

2026-01-02 16:31:04.967 [info] Launching SSH server via shell with command: cat “/var/folders/ls/lk2x63852z1b7qh25yx5f3h40000gn/T/cursor_remote_install_e19aff68-24cb-4dab-839e-7e0c7b8358af.sh” | ssh -T -D 57206 <SPACE_NAME>@ssh.hf.space bash --login -c bash

2026-01-02 16:31:04.967 [info] Establishing SSH connection: cat “/var/folders/ls/lk2x63852z1b7qh25yx5f3h40000gn/T/cursor_remote_install_e19aff68-24cb-4dab-839e-7e0c7b8358af.sh” | ssh -T -D 57206 <SPACE_NAME>@ssh.hf.space bash --login -c bash

2026-01-02 16:31:04.967 [info] Started installation script. Waiting for it to finish…

2026-01-02 16:31:04.968 [info] Waiting for server to install. Timeout: 300000ms

2026-01-02 16:31:11.178 [info] (ssh_tunnel) stdout: Configuring Cursor Server on Remote

2026-01-02 16:31:11.639 [info] (ssh_tunnel) stdout: Using TMP_DIR: /tmp

2026-01-02 16:36:11.640 [error] Error installing server: Failed to install server within the timeout

2026-01-02 16:36:11.640 [info] Deleting local script /var/folders/ls/lk2x63852z1b7qh25yx5f3h40000gn/T/cursor_remote_install_e19aff68-24cb-4dab-839e-7e0c7b8358af.sh

2026-01-02 16:36:11.643 [error] Error resolving SSH authority Failed to install server within the timeout

Hey @landon I am Tarun from the extensions team!

I was indeed able to reproduce the issue.
I am looking into the fix, will inform you once i have a workaround or a more permanent fix!

Thanks for reporting!
Really appreciate it!

2 Likes

Awesome, thanks a lot!

1 Like

Hey Landon!

quick update - we got in touch with the huggingface team about this and we are sorting out the fix.

1 Like

Hey @landon!!

The issue is fixed!
You should now be able to access your spaces right inside our IDE.
Huge shoutout to Adrien from the HuggingFace team for fixing it on such a short notice!
Thanks for reporting again, appreciate it!

Lmk if you encounter any other issues!
:saluting_face: