Blog Post Notes: Remote SSH to UW-Madison CS Lab with Zed

Context

How VSCode Remote SSH Works (for comparison)

How Zed Remote SSH Works (architecture difference)

Problems Encountered and Solutions

Problem 1: Hanging at “Starting proxy…”

Problem 2: “Client exited with exit_code 1” (Unix sockets on AFS)

Problem 3: “Client exited with exit_code 1” (load balancer)

Problem 4: Binary not found / upload issues

Working SSH Config

Host uw
    HostName best-linux.cs.wisc.edu
    User salm

Host uw-zed
    HostName vm-instunix-15.cs.wisc.edu   # specific machine, not load balancer
    User salm

Host *
    ControlMaster auto
    ControlPath ~/.ssh/%r@%h:%p
    ControlPersist 300s

Working Zed Settings

{
  "ssh_connections": [
    {
      "host": "vm-instunix-15.cs.wisc.edu",
      "username": "salm",
      "args": [],
      "projects": [
        {
          "paths": ["/home/salm"]
        }
      ]
    }
  ]
}

Working Remote ~/.zshrc (first lines)

[[ -o interactive ]] || return 0
# rest of .zshrc (p10k, etc.)

# Ensure Zed temp dirs exist (cleared on reboot)
mkdir -p /tmp/zed-$USER

Verified: Both AFS and Load Balancer Issues Are Real

Key Takeaways for the Blog Post

  1. Zed’s remote SSH works differently from VSCode — it uses Unix sockets instead of file locks
  2. AFS doesn’t support Unix sockets (VSCode’s issues were with file locks — different problem, similar solution of using /tmp)
  3. University lab load balancers break multi-connection tools — always use a specific hostname
  4. Shell startup output (p10k, conda init, etc.) can corrupt SSH protocol channels
  5. The fix requires changes on BOTH the remote (symlinks, zshrc guard) and local (specific hostname) sides
  6. Once configured, Zed remote SSH works great — tree-sitter highlighting locally, language servers remotely
  7. upload_binary_over_ssh: true is useful when the remote can’t reach GitHub

Comparison: VSCode vs Zed for Remote SSH on AFS

Issue VSCode Workaround Zed Workaround
AFS file locking lockfilesInTmp: true, useFlock: false Symlink ~/.local/share/zed/tmp
Login prompt showLoginTerminal: true Built-in SSH password dialog
Load balancer Use specific hostname Use specific hostname
Shell output N/A (more resilient) `[[ -o interactive ]]
Binary delivery Auto-downloads vscode-server Auto-downloads zed-remote-server (or upload_binary_over_ssh)

Additional Details Worth Mentioning