- Notifications
You must be signed in to change notification settings - Fork926
Closed as not planned
Description
When using SSH (ssh coder.workspace
), the connection remains active after being disconnected from agent.
Steps to reproduce:
coder create workspace
ssh coder.workspace
coder delete workspace
(orstop
,start
)
After step 3, the SSH command remains running until user input. After the switch to Tailscale networking, this applies for bothssh
usingProxyCommand
andcoder ssh
. (Also applies to other commands using SSH, likesftp
.)
Typically when an SSH server goes away, the client is notified and we see something like:
Connection to [host] closed by remote host.Connection to [host] closed.
Ideally we would also detect this client-side by checking workspace status from the coder API, if we're trying to connect to an outdated agent (i.e. workspace state changed after connection), we should either:
- Disconnect and exit
- Reconnect with a "Reconnected, but previous state was lost" (this is not a good message, just to illustrate)