Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Claude discovers a novel enzyme system with CRISPR-like repeats(anthropic.com)
    359comments
  2. VSCode's SSH Agent Is Bananas(fly.io)
    23comments
  3. Claude's Load-Bearing Seams(madradavid.com)
    10comments
  4. Fixing the Portobello Police Station Clock(pointinthecloud.com)
    80comments
  5. LensVLM: Compressing long context as images, expanding only relevant pages(huggingface.co)
    2comments
  6. A brief history of Windows scroll bar shortcuts(devblogs.microsoft.com/oldnewthing)
    36comments
  7. Italian parliament votes for return to nuclear energy(apnews.com)
    271comments
  8. OpenAI breaches Medicare, Albanese reveals(smh.com.au)
    23comments
  9. The Curious Power of Punctuation(newyorker.com)
    1comments
  10. Jev in 25 Lines of Python(nobodywho.ai)
    190comments
  11. Gemini 3.8 text-to-speech(blog.google)
    113comments
  12. Show HN: An atlas of system designs with interactive architecture diagrams(atlas-sysdes.vercel.app)
    6comments
  13. The mystery animal on an ancient god's head(signoregalilei.com)
    2comments
  14. Radicle: Disclosure of Vulnerability in the Network Protocol(radicle.dev)
    37comments
  15. DoorDash Spent $1.4M Trying to Stop Mamdani from Becoming Mayor. Now We Know Why(theintercept.com)
    92comments
  16. Tokens too cheap to meter(jyn.dev)
    170comments
  17. Swap, ZRAM, Zswap and Hibernate on NixOS(matthewbrunelle.com)
    3comments
  18. A refined phylochronology of the second plague pandemic in Western Eurasia(pnas.org)
    discuss
  19. I don't want the details(michaelheap.com)
    185comments
  20. Show HN: I built a post-mortem debugger for native Windows x64/x86 crashes(forensicdbg.com)
    1comments
  21. Z80 REPL (2018)(abagames.github.io)
    18comments
  22. Claude Code reads AGENTS.md only when telemetry is on [fixed](szypowi.cz)
    239comments
  23. Stripe's Knowledge AI Platform(stripe.dev)
    100comments
  24. Show HN: Conway's Game of Life in boot sector(github.com/0xax)
    3comments
  25. QuestDB (YC S20) Is Hiring a Sales Engineer(questdb.com)
    discuss
  26. Once Claude can measure something, it can make it faster(claude.dev)
    76comments
  27. UK military jamming other nations' satellites to defend itself, BBC told(bbc.com)
    159comments
  28. Making Tailscale Faster(tailscale.com)
    4comments
  29. Seattle City Council votes to ban surveillance pricing in sale of groceries(consumerreports.org)
    148comments
  30. 28% of job postings on company career sites have been open over 90 days(unlisted.careers)
    270comments

VSCode's SSH Agent Is Bananas

41 pointsby 1h agofly.io
23 comments
34m agoHN ↗

When I give an agent ssh access to something I want to be able to watch and fully understand what it's doing. I want it to essentially only "type" things into the CLI that I could have typed myself, I can comprehend what it's doing, and am not surprised by the results. Opencode and a smart LLM (qwen 3.8-flash-next, deepseek v4 0731 or smarter) do relatively well with this in my experience.

13m agoHN ↗

And if everyone was like you AI safety wouldn't be that large of concern. The default human behavior seems to be fire and forget which can go off the rails really quick.

11m agoHN ↗

It's not like I've never told an agent to build an ssh tunnel or some sort of more persistent connection between my dev machine running the harness and the remote thing it is talking to as an SSH client... Just that I don't want it going and doing that proactively unless I specifically define the parameters first.

32m agoHN ↗

Missing a (2025)

FYI VSCode's SSH Agent is a godsend for remote development - the "disadvantages" that Fly lists are part of its advantages. I've worked in several teams that have made extensive use of the extension, and it's never been an issue. You can restrict SSH access arbitrarily to ensure whatever security or access guardrails you need.

20m agoHN ↗

“A tool with a purpose of editing files on a remote system can edit files on a remote system.”

13m agoHN ↗

it's worse than that, last i looked into this - there's functionality in the protocol that allows the remote system to modify files and execute code on the local/frontend system. it really is bananas.

9m agoHN ↗

Reminds me of the old Jenkins protocol which warned about "slaves" getting access to execute code on the "master": who's the master now? ;)

9m agoHN ↗

Yeah this is the right architecture for remote editing with remote tools. It works really well. (There are longstanding bugs around reconnection when the SSH connection is broken but that's not the fault of the architecture.)

29m agoHN ↗

Emacs hosts the spiritual forebearer of remote editing systems, a blob of hyper-useful Elisp called “Tramp”. If you can hook Tramp up to any kind of interactive environment — usually, an SSH session — where it can run Bourne shell commands, it can extend Emacs to that environment.

vs.

The agent runs over port-forwarded SSH. It establishes a WebSockets connection back to your running VSCode front-end. The underlying protocol on that connection can: Wander around the filesystem; - Edit arbitrary files; Launch its own shell PTY processes; Persist itself.

So... basically the same things that Tramp could do as well?

In security-world, there’s a name for tools that work this way. I won’t say it out loud, because that’s not fair to VSCode, but let’s just say the name is murid in nature.

Yeah, it's called RAT, and an ur-example of it is SSH itself (especially when allowed to run a shell remotely), so... not sure why are you freaking out.

I mean, I'd probably prefer if VS Code simply ran ed/vim remotely, but both of those editors can invoke shell anyhow so... eh?

2m agoHN ↗

basically the same things that Tramp could do as well?

Yes, just much faster. At the cost of a proprietary binary blob on the remote end, whereas tramp works with bare sh/bash.

However there's now tramp-rpc, which is tramp but talks to a Rust client on the remote side, and that makes Emacs even faster than vscode-over-ssh.

27m agoHN ↗

This part of VSCode's architecture is acceptable to me. The reverse direction, where a compromised remote can do whatever it wants to my local machine, is not.

19m agoHN ↗

This extension and devcontainers is basically the way to go for large dev teams inmho

15m agoHN ↗

The agent is supposed to run on a remote dev box. The purpose is to make the remote machine an extension of your local one, to run extensions, containers, test deployments, forward ports and tons more. If you are installing it on production servers and are surprised by its behavior that’s on you.

15m agoHN ↗

Moreover, it explicitly breaks in VSCodium and no good alternatives exist.

11m agoHN ↗

You say that like it's a bad thing; I narrowly escaped serious use of VSCode thanks to this fact.

10m agoHN ↗

The problem isn't that it can edit remote files or run remote shell commands.

The problem is that it appears to do this via an AI Agent. This broadens the security concerns significantly.

10m agoHN ↗

It turns out we don’t have to care about any of this [...], so none of this matters in any kind of deep way, but: we’ve decided to just be a blog again, so: we had to learn this, and now you do too.

I found this closing sentence utterly delightful, particularly in an age of endlessly filtering every piece of text I read on the internet through a mental "was this written by Claude, Codex, or (just possibly) a human?" filter.

7m agoHN ↗

off topic, but I feel this observation was quite early in feb' 2025: "LLM-generated code is useful in the general case if you know what you’re doing. But it’s ultra-useful if you can close the loop between the LLM and the execution environment (with an “Agent” setup)."

kudos

5m agoHN ↗

So a program that is specifically designed to edit files and run arbitrary commands on a remote machine... can do so. Not sure where the bananas part comes in. Sending a binary over SSH/SFTP might sound weird at first glance, but VSCode can't assume that your remote machine can access the wider internet, and it needs a reliable way to bootstrap the agent on the remote. Shipping it over the SSH tunnel is the natural solution.

2m agoHN ↗

For my own agent one of the design constraints is that it can't get out of the work directory, and it can't even try to guess the full path of that directory. Interesting that VSC has gone the other way entirely.

2m agoHN ↗

I avoided Zed for a long time because of the SSH feature in VScode. Then I realized Zed has SSH remote too. Just flagging this for anyone else who relies on vscode-over-ssh and is sick of the bloat.