VSCode's SSH Agent Is Bananas (2025)

266 points · 164 comments on HN · read original →

Points and comments are a snapshot, not live.

VSCode's SSH remote extension runs a full Node agent, not just a shell session.

Thomas Ptacek critiques VSCode's SSH remote development feature, contrasting it with Emacs' Tramp which 'lives off the land' by running shell commands. VSCode instead deploys a Bash stager that downloads a Node.js agent onto the remote host. This agent establishes a WebSocket back to the local VSCode, enabling filesystem access, file editing, PTY spawning, and persistence. Ptacek suggests the architecture resembles a tool whose name is 'murid in nature' (i.e., rodent-like, implying a rat). He expresses concern about using such access on dev servers or production, noting Fly.io avoids this by using a custom connection to their Fly Machines.

What commenters are saying

Commenters split into two camps. Some defend the architecture as a necessary trade-off for low-latency remote editing and file streaming, calling it a 'godsend' for teams. Others agree with the article's security concerns, pointing out that the protocol allows the remote host to execute code on the local machine. A security note on the extension page confirms this risk: 'A compromised remote could use the VS Code Remote connection to execute code on your local machine.' Multiple commenters note practical admin headaches: VSCode ignores MotD, fails on BSD, creates dangling SSH sessions that overwhelm login nodes, and can trigger process limits via fork bombs.