Skip to content

Hard to exit coder ssh after workspace/agent has gone away #4787

Closed as not planned
@mafredri

Description

@mafredri

This is partially related to #2130, but different enough to warrant it's own issue. (This is borderline a bug, maybe a feature.)

When using coder ssh there's no way to exit the command after losing connection to the agent. If the workspace was shut down, reconnection will never happen and the only way to quit the command is to:

  1. Close the terminal
  2. Run kill $pid from another terminal (or process manager)
  3. Wait for ~20 minutes until the command exits by itself with message (see below)

Exit message for coder ssh after ~20 minutes of workspace being shut down:

SSH connection ended unexpectedly
Run 'coder ssh --help' for usage.

This is not a critical issue but the user experience could be improved. That is to say, it's not ideal that the user has no option but to open a second terminal / process manager.

SSH has a key combination that immediately exists the command no matter what: ↩~. (return tilde dot). Listening to this combo in coder ssh could make sense too. Alternatively this issue could be alleviated by exiting on workspace stop (i.e. proposed fix in #2130).

Metadata

Metadata

Assignees

No one assigned

    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