hn.today

VSCode's SSH Agent Is Bananas

fly.io301 points199 comments
Screenshot of VSCode's SSH Agent Is Bananas

A concise critique of how VSCode performs remote editing over SSH: Fly explored integrating with VSCode for running LLM-driven code agents on ephemeral Linux instances rather than on developers' laptops, to keep iterative, execution-driven LLM workflows contained. Emacs’ Tramp model, which runs commands over a simple remote shell, was presented as the minimalist ancestor VSCode could emulate. Instead, VSCode installs a staged agent on the remote host that includes a Node binary and a persistent runtime, an architecture that departs sharply from Tramp’s lightweight approach.

The investigation shows the agent opens a WebSocket back to the VSCode front end over port-forwarded SSH and exposes a protocol able to traverse the filesystem, edit files, spawn interactive PTYs, and persist itself. That capability makes remote instances effectively controllable by VSCode and raises serious operational and security concerns - especially on dev servers or during production incidents. Fly ultimately found that none of this invasive machinery is necessary to connect to Fly Machines, but the discovery is a strong warning about VSCode’s remote agent model. Written by Thomas Ptacek, Feb 7, 2025.

Read on fly.io199 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Security

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.