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
Refactor coder agent SSH server for better process and connection control #6177
This is, in part, to better support shutdown_scripts as part of #4677 and #6139. But improved user experience is also a big factor.
Problem: Even though the coder agent initiates a graceful shutdown, the SSH connections are abruptly closed leaving SSH clients hanging. Similarly any process started inside an SSH session will be left running (e.g. sleep 1000 &) after the SSH server is closed.
To improve upon this, we need to:
For all active sessions with TTYs, print a message that the workspace is closing
For all active sessions with TTYs, print a message that the workspace is closing
I recall that Jetbrains Gateway requests a PTY when they SSH to run commands. So, I don't think the presence of a PTY is a reliable indicator that you have a human with a shell on the other end. Printing stuff could have undesirable effects.
Activity
spikecurtis commentedon Mar 16, 2023
I recall that Jetbrains Gateway requests a PTY when they SSH to run commands. So, I don't think the presence of a PTY is a reliable indicator that you have a human with a shell on the other end. Printing stuff could have undesirable effects.
refactor(agent): Move SSH server into agentssh package
refactor(agent): Move SSH server into agentssh package (#7004)
feat(agentssh): Gracefully close SSH sessions on Close
feat(agentssh): Gracefully close SSH sessions on Close (#7027)