Skip to content

Refactor coder agent SSH server for better process and connection control #6177

Closed as not planned
@mafredri

Description

@mafredri

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:

I think it would make sense to refactor SSH functionality for the agent as a separate package, e.g. agentssh or agent/sshd. See list above.

Future work/ideas:

  • Consider forking/forkexec coder agent to manage new SSH connections
    • This could allow the coder agent to be updated without terminating active connections

Metadata

Metadata

Assignees

Labels

cliArea: CLIstaleThis issue is like stale bread.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions