Skip to content

RStudio Server terminal stops accepting keyboard input after exiting an SSH session #18386

Open

Description

@piiskop

System details

RStudio Server version: 2026.06.0+242 (Blue Plumbago)
Server OS: Ubuntu Jammy
Client OS: Windows 11
Browser: Brave/Chromium

Steps to reproduce

  1. Open a new Terminal in RStudio Server.

  2. Start an SSH session:

    ssh 'peacecop [email protected]'

    The remote username contains a space, hence the quoting.

  3. Use the remote shell normally.

  4. Run:

    exit

  5. The SSH connection closes and the local RStudio Server shell prompt is displayed again.

Actual behavior

The local prompt is visible, but the terminal no longer accepts keyboard input:

  • typed characters do not appear;
  • commands are not sent to the shell;
  • Ctrl+Q and Ctrl+C have no effect;
  • it is therefore not possible to run stty sane;
  • the Terminal tab remains marked “busy”.

Opening a new RStudio terminal works normally. The same problem reproduced again after exiting another SSH session in the new terminal.

Expected behavior

After exit, the local shell should regain control and immediately accept keyboard input.

Additional information

The SSH session itself works normally. The problem occurs only after returning from SSH to the local shell inside the RStudio Server web terminal.

Image Image

Activity

  1. piiskop commented on Jul 29, 2026

    @piiskop
    Author

    The issue is intermittent. In some terminal sessions, input stops working after exiting SSH; in another attempt, the local prompt accepted commands normally after exit.

  2. added theissue type on Jul 29, 2026
  3. gtritchie commented on Jul 29, 2026

    @gtritchie
    Member

    Thanks for the report, and for the follow-up noting that it's intermittent.

    The symptoms you describe (nothing echoes, Ctrl+C has no effect, Enter doesn't submit, no way to run stty sane) are consistent with more than one underlying cause, and they'd be fixed in different places, so some extra information would help narrow it down. The next time a terminal gets into this state, if you're able to collect any of the following:

    1. Terminal diagnostics. With the stuck terminal selected, choose "Terminal Diagnostics..." from the Terminal tab's dropdown menu (the gear/menu next to the terminal name) and paste the output here. It reports which channel the terminal is using (websocket vs. RPC) plus a connection log; entries about the websocket closing, or about user input not being sent, would point at the client/server connection rather than at the shell.

    2. Server-side state of that terminal's pty. From a separate shell on the server (a new RStudio terminal, or an SSH login), using the tty shown in the diagnostics output above:

      • ps -ft pts/N — is an ssh process, or anything else, still running on that terminal?
      • stty -a -F /dev/pts/N — are echo, icanon, or isig disabled (shown as -echo, -icanon, -isig)? That would indicate the pty was left in raw mode when the SSH session ended.
    3. Browser console. Open devtools in Brave (Ctrl+Shift+I) and check the Console tab for errors, in particular anything about a lost WebGL context.

    4. Rendering engine. Does the problem still occur if you uncheck Tools → Global Options → Terminal → Display → "Hardware acceleration"? If it stops reproducing, that points at Terminal does not recover from WebGL context loss #18393, and leaving that box unchecked is a workaround in the meantime.

    Two more questions that may be relevant:

    • Does your SSH configuration for that host use ControlMaster/ControlPersist, or does anything get left running in the background on the remote side? A surviving background process on the local shell would explain the Terminal tab staying marked busy.
    • When the terminal is stuck, does anything at all repaint — for example, does dragging the divider to resize the Terminal pane suddenly reveal output you'd typed earlier?
  4. self-assigned this
    on Jul 29, 2026
  5. piiskop commented on Jul 30, 2026

    @piiskop
    Author
    Image

    There is no such thing as "Diagnostics".

    1. ONS kalmer@ons:~/rstudio-projects/harija$ ps -ft pts/N
      error: TTY could not be found

    Usage:
    ps [options]

    Try 'ps --help <simple|list|output|threads|misc|all>'
    or 'ps --help <s|l|o|t|m|a>'
    for additional help text.

    For more details see ps(1).
    ONS kalmer@ons:~/rstudio-projects/harija$ stty -a -F /dev/pts/N
    stty: /dev/pts/N: No such file or directory

    1. C + S + i opens Posit assistant.
    Image
    1. I disabled hardware acceleration and the terminal is still not writable.

    Regarding to your first additional question: I do not know anything about these things, so I cannot answer.

    Resizing the panel works as intended.

  6. gtritchie commented on Jul 30, 2026

    @gtritchie
    Member

    Ah sorry, I forgot that the "Terminal Diagnostics" feature got removed a while ago. It was rarely (if ever) helpful but asked for it out of habit.

    I'll try and setup a repro for this on my side. If we're lucky, it's a consistent problem.

  7. removed their assignment
    on Aug 10, 2026
  8. gtritchie commented on Sep 21, 2026

    @gtritchie
    Member

    Sorry about the long delay.

    I have not been able to reproduce this using RStudio Server 2026.06.0+242 on Ubuntu Jammy, with a username containing a space. When I ssh from the RStudio terminal, then exit the ssh session, the terminal remains responsive for me. I was using latest Chrome (albeit on Ubuntu 26, not Windows-11, but that shouldn't be a factor here).

    Could you try using a newer release of RStudio Server? We do monthly releases now, and the most recent is 2026.09.0+174 (https://docs.posit.co/ide/user/#rstudio-server-oss-downloads). There have been several terminal-related fixes since 2026.06, although nothing leaps out at me as directly matching what you are experiencing. It is worth a try, though.

  9. 3 remaining items

  10. piiskop commented on Sep 22, 2026

    @piiskop
    Author

    Thanks. I upgraded RStudio Server from 2026.06.0+242 to 2026.09.0+174, and the problem appears to be fixed. After exiting an SSH session, the terminal accepts keyboard input normally again.

  11. piiskop commented on Nov 3, 2026

    @piiskop
    Author

    The problem has returned on November 3, 2026. RStudio terminal tabs have stopped accepting keyboard input several times today during normal server maintenance. This was not associated with any known SSH logout.

    The terminal prompt and previous output remain visible, but the terminal is no longer writable. Another terminal tab continues to work.

    The issue appeared fixed after upgrading to RStudio Server 2026.09.0+174, but has now recurred.

    Please reopen this issue. I also need a solution that preserves the terminal's output history.

  12. piiskop commented on Nov 4, 2026

    @piiskop
    Author

    Another recurrence on November 4, 2026, at approximately 18:37 EET.

    Terminal 2 stopped accepting keyboard input during normal Nextcloud server administration. I had to continue in Terminal 3, which remained usable.

    This is still occurring with RStudio Server 2026.09.0+174. Disabling terminal hardware acceleration has not resolved the issue.

    Please investigate how to restore an unresponsive terminal without losing its output history.

  13. removed their assignment
    on Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions