Skip to content

Persistent SSH session #3096

Open
Open

Description

A lot of users of our Julia extension love the remote SSH features, they are super useful in a scientific research computing context!

One thing that has come up a lot lately, though, is that folks want an ability to have a persistent session on a server that they can disconnect from and then reconnect to way later.

The scenario is essentially something like this:

  1. User connects to some remote server via the Remote SSH extension
  2. They do some work
  3. They get interrupted and close their local VS Code instance
  4. They do something else for a couple of days
  5. The now want to reconnect to the server, and ideally nothing was shut down on the server. For example, if they opened a REPL in step 2 and started a Julia instance in that REPL, it would still be running, and was never shut down. Similarly with pretty much all other runtime state they had.

I think this might be related to #440, but what I'm really asking for is not just an option to change the timeout, but some way to make the timeout infinit, so that the server session never shuts down.

This might also require some kind of UI, maybe a command like "Disconnect but keep server alive" or something like that, not sure.

Activity

  1. xgdgsc commented on Jun 4, 2020

    @xgdgsc

    #1790 also related.

  2. EricChen1248 commented on Jul 15, 2020

    @EricChen1248

    Not a perfectly solution, but what about opening the terminal into Screen. Users could reconnected back to their screen session each time, also gives more fine grain control over resource releases (properly terminating a process vs an always persistent session)

  3. PavelSosin-320 commented on Jul 15, 2020

    @PavelSosin-320

    This is a well-known pattern in the Cloud Applications. The problem is always that lifecycles of Server and client are not synchronized and either server or client or connection can go down at any point all clients will hang. Then, clients have to re-authenticate. If the client is idle at the point of time was idle its user will have no knowledge of how to proceed. To avoid such a died-end situation client needs awareness of the "session status" i.e. Server needs session management and ability to report either current session status to the client, at least, by the explicit client's request or every re-connect request coming from the client has had session attribute. There is also a security risk that the session can be hijacked by anybody who has a valid login of the server when the client was idle.

  4. vscode-triage-bot commented on Nov 6, 2020

    @vscode-triage-bot
    Collaborator

    This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 10 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

    Happy Coding!

  5. vscode-triage-bot commented on Nov 6, 2020

    @vscode-triage-bot
    Collaborator

    🙂 This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.

    Happy Coding!

  6. janosh commented on Feb 16, 2021

    @janosh

    Glad I found this! Just wanted to mention that I believe this is far larger in scope than the Julia extension. I bet most people forced to work from home these days would really appreciate this feature!

  7. bobaoapae commented on Feb 17, 2021

    @bobaoapae

    This is what i need for stop using RDP to remote developmet. Sometimes i need keep service runing for several days and i don't want keep my own pc on just for it. Keep process running without vscode remain connected and re-establish connection/state after re-open vscode will be amazing!

  8. tom-programming commented on Feb 25, 2021

    @tom-programming

    This would be a real game changer for myself, and I believe, a whole lot of people. Now I use tmux to achieve the same but it is uncomfortable in many ways

  9. 84 remaining items

  10. tsuna commented on Feb 28, 2026

    @tsuna

    I run remote-ssh over quicssh to work around this issue and also have my SSH sessions survive IP address changes that can happen along the way.

  11. fehmi commented on Mar 22, 2026

    @fehmi

    Me also tired of manual reloading.

  12. CherryDT commented on Apr 2, 2026

    @CherryDT

    It is very annoying that this happens on WSL (not SSH - but issue #10767 was redirected here) after waking computer now all the time. It used to work fine.

  13. fehmi commented on Apr 3, 2026

    @fehmi

    Hopefully this can be solved soon, it's the most voted issue. 🤞

    The issue is not even in the backlog yet.

  14. CherryDT commented on Apr 3, 2026

    @CherryDT

    For WSL it's a regression though... :(

  15. charles-cai commented on Apr 29, 2026

    @charles-cai

    lost in the chat history, so 6 years down the line, where are we?

    probably devtunnels is the way to go? https://aka.ms/devtunnels above which was posted in 2023, sigh

  16. youngdjn commented on Apr 29, 2026

    @youngdjn

    For data scientists using Python or R specifically, the excellent VS Code fork Positron supports long-running SSH sessions.

  17. joelsandocu commented on May 19, 2026

    @joelsandocu

    This would be a very useful feature, +1,000,000 votes!

  18. tsuna commented on Jun 27, 2026

    @tsuna

    I could implement this easily if the extension was open source. Does anyone know why it's kept closed source?

  19. cristianocca commented on Sep 18, 2026

    @cristianocca

    +100

  20. unleex commented on Oct 11, 2026

    @unleex

    any temporary solution or a crutch, at least?

  21. jodjo86 commented on Oct 14, 2026

    @jodjo86

    Has anyone tried Persisterm as a workaround for this issue? It seems to provide exactly the persistent SSH terminal experience we're looking for. I'd be interested to hear about its reliability and any potential drawbacks.

  22. mmis1000 commented on Oct 16, 2026

    @mmis1000
    POC Images Image Image Image

    Using vscodium and open-remote-ssh as base.
    I vibed it with claude and chatgpt for POC for experiment.

    Added

    • a control to make terminal persistent regardless of window closed or not
    • a command to bring back terminal that is no longer displayed in current window

    It turns out

    • the change isn't big, the total LOC is around 500~800 for these change, smaller than a moderate extension project
    • there is NO actual extension change required(except turn off auto shutdown or it will kill subprocesses all together), what it actually require is vscode.Server and vscode client interface change

    POC url

    Limit of POC

    • It did not handle vscode update and migration of process between different version of vscode server at all.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestRequest for new features or functionalityplan-reviewPM-highlighted item determined to be P1 or P2remoteIssues in the code server supportsshIssue in vscode-remote SSH

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions