Description
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:
- Close the terminal
- Run
kill $pid
from another terminal (or process manager) - 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).