‹ BackHN Continuity

Thread

VSCode's SSH Agent Is Bananas (2025)

310 points · 218 comments · Rapzid

  1. danielklnstein · · focus · HN ↗
    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.

    1. godelski · · focus · HN ↗
      As a Linux user I've hated VSCode's ssh. There's lot of annoying things that make it harder to admin for. Like it doesn't pick up the MotD, preventing me from showing users important messages. I've found that it also doesn't reuse sessions (at least by default. TBF, neither does ssh) and I'll find that there's just dozens of open sessions over months from users. I literally had to write a script to boot people...

      It would be one thing if the plugin was just a wrapper and people were still expected to know ssh but the plugin abstracts away all that and is intended to make it a "use VSCode on remote machine" tool. So it needs to do more than just handle creds, otherwise it creates a divergent experience while making people think it's just ssh

      1. causal · · focus · HN ↗
        And it’s really opaque. Would be fine if it were an open source package but there’s a lot of mystery behind how it’s implemented.
        1. godelski · · focus · HN ↗
          Exactly! Like if I'm admining a server what am I supposed to do? Message on a big slack channel and have everyone ignore me? It's easy when people are just logging in through normal ssh as I can put a big bright warning message on their screen that they can't ignore.

          Also, timeouts...

          Also, does anyone know if VSCode supports mosh?

          1. serbuvlad · · focus · HN ↗
            Could just put this in /etc/bashrc.

                if [[ $TERM_PROGRAM = vscode && -f /etc/motd ]]; then
                  cat /etc/motd
                fi
            
            Assuming your users use the integrated terminal regularly
            1. godelski · · focus · HN ↗
              Tried that. But I suspect you know why it didn't work
              1. serbuvlad · · focus · HN ↗
                I don't
                1. lexicality · · focus · HN ↗
                  I suspect vscode claims to xterm-256 and doesn't bother to identify itself in any other way
                  1. serbuvlad · · focus · HN ↗
                    It does identify itself on my machine

                        $ echo $TERM
                        xterm-256color
                    
                        $ echo $TERM_PROGRAM
                        vscode
                2. godelski · · focus · HN ↗

                    >>> Assuming your users use the integrated terminal regularly
                  
                  People don't use the integrated terminal regularly
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.