You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RStudio Server terminal stops accepting keyboard input after exiting an SSH session #18386
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.
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:
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.
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.
Browser console. Open devtools in Brave (Ctrl+Shift+I) and check the Console tab for errors, in particular anything about a lost WebGL context.
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?
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).
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.
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.
Activity
piiskop commentedon Jul 29, 2026
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.
gtritchie commentedon Jul 29, 2026
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: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.
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 ansshprocess, or anything else, still running on that terminal?stty -a -F /dev/pts/N— areecho,icanon, orisigdisabled (shown as-echo,-icanon,-isig)? That would indicate the pty was left in raw mode when the SSH session ended.Browser console. Open devtools in Brave (Ctrl+Shift+I) and check the Console tab for errors, in particular anything about a lost WebGL context.
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:
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.piiskop commentedon Jul 30, 2026
There is no such thing as "Diagnostics".
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
Regarding to your first additional question: I do not know anything about these things, so I cannot answer.
Resizing the panel works as intended.
gtritchie commentedon Jul 30, 2026
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.
gtritchie commentedon Sep 21, 2026
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.
3 remaining items
piiskop commentedon Sep 22, 2026
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.
piiskop commentedon Nov 3, 2026
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.
Cancel queued terminal input when disconnecting
Preserve terminal connections created during input cancellation
Add reproducible terminal session lifecycle regression tests
Add end-to-end tests for terminal WebSocket recovery
piiskop commentedon Nov 4, 2026
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.
Harden terminal WebSocket recovery and callback lifecycle (#19413)