Story Details

  • VSCode’s SSH agent is bananas

    Posted: 2025-02-08 01:25:32

    VS Code's remote SSH functionality can lead to unexpected and frustrating behavior due to its complex key management. The editor automatically adds keys to its internal SSH agent, potentially including keys you didn't intend to use for a particular connection. This often results in authentication failures, especially when using multiple keys for different servers. Even manually removing keys from the agent within VS Code doesn't reliably solve the issue because the editor might re-add them. The blog post recommends disabling VS Code's agent and using the system SSH agent instead for more predictable and manageable SSH connections.

    Summary of Comments ( 448 )
    https://news.ycombinator.com/item?id=42979467

    HN users generally agree that VS Code's remote SSH behavior is confusing and frustrating. Several commenters point out that the "agent forwarding" option doesn't work as expected, leading to issues with key-based authentication. Some suggest the core problem stems from VS Code's reliance on its own SSH implementation instead of leveraging the system's SSH, causing conflicts and unexpected behavior. Workarounds like using the Remote - SSH: Kill VS Code Server on Host... command or configuring VS Code to use the system SSH are mentioned, along with the observation that the VS Code team seems aware of the issues and is working on improvements. A few commenters share similar struggles with other IDEs and remote development tools, suggesting this isn't unique to VS Code.