VSCode's SSH Agent Is Bananas (2025)
TL;DR Highlight
VSCode Remote-SSH installs Node and an agent on the remote that can touch files and shells
Who Should Read
Developers planning to run LLM agents on a remote sandbox server via VSCode Remote-SSH
Core Mechanics
- VSCode installs an agent on the remote
- Emacs Tramp only runs shell commands over the connection.
- VSCode runs a Bash stager that downloads an agent including a Node binary.
- The agent can do a lot
- It connects back to your local VSCode over WebSockets via port-forwarded SSH.
- It can browse the filesystem, edit arbitrary files, launch shell PTYs, and persist itself.
- The author is nervous about production
- He'd be a little nervous about remote-editing on dev servers.
- He'd be apoplectic if it happened during a production incident.
- LLM loops belong on a clean Linux box
- An agent loop runs code, feeds errors back to the LLM, and iterates, which is a semi-effective antidote to hallucination.
- He wants it on an instant clean-slate Linux instance, not a dev laptop.
- Fly Machine connection didn't depend on this
- A custom connection to a Fly Machine worked in VSCode without caring about it.
- The post just shares what they learned.
Community Reactions
- Opinion: it's a feature for remote dev
- Commenters on several teams used the extension extensively without issues.
- They say SSH access can be restricted to enforce guardrails.
- Opinion: the reverse direction is the problem
- A compromised remote may execute code on the local machine.
- A commenter quoted the official extension's security notice saying so.
- Opinion: sandboxes aren't really sandboxes
- If the remote can't be trusted, it can own your local machine.
- Another commenter clarified that the agent here is VSCode's SSH agent, not an LLM agent.
- Size and alternatives reported
- One user reported .vscode-server at 6.0G.
- Others switched to Zed's SSH remote or ran code serve-web over Tailscale without SSH.
How to Apply
- Check .vscode-server on your servers
- Run du -h -d 0 ~/.vscode-server on the remote to see its size.
- Also check ps for lingering node processes.
- Set a Remote-SSH policy for production
- Ban VSCode Remote-SSH on production or limit which accounts can use it.
- Write separate dev and prod rules in the team wiki.
- Treat the agent sandbox as a trust boundary
- Assume a compromised remote can attack your local machine when connecting with VSCode.
- Keep sensitive credentials off the laptop or connect from a separate environment.
Try It
# Paste into a terminal on the remote server over SSH (check for VSCode Remote-SSH leftovers)
du -h -d 0 ~/.vscode-server
ps aux | grep -i '[.]vscode-server'
# Next: reflect the results in your team's access policyTerminology
Related Papers
Frostbite: A new CPU architecture discovered, designed and verified by AI
AI agents designed a CPU from scratch, claiming 4.59x perf/W over a traditional core
Restricting AI agents in mobile operating systems platforms from capturing data
Signal now blocks OS-level AI agents from reading its screen on iOS 27 and Android
Actions Speak Louder than Words: Stateful Privacy Sniffing of LLM Agents via Behavioral Covert Channels in Web Interactions
Agents' link choices alone let attackers rebuild user queries at F1 0.89; SOR cuts it to 0.39.
Tracking and Limiting Unsupported Claim Propagation in Multi-Agent LLM Systems: A Provenance-Aware Framework
Passing claims with source, evidence and history kept equivalence at 5 agent stages at 96% versus 31%.
LLM assisted reverse engineering
Pointing an agent at binaries with skills and MD notes made years-long hacks feasible
Metrics-in-the-Loop: Complexity Feedback Reshapes Agent-Written Code
Injecting per-turn complexity reports into coding agents cut code erosion without changing correctness
Why is Gemini 4 Carbon taking so long?
Carbon took nearly an hour on bug fixes that Astra and Opus finished in minutes, mostly from extra unrequested work.
Weight-Space Programming builds neural networks like a 1990s researcher
LLM hand-wrote MNIST weights to 91.3%, using 1990s-style techniques