Skip to content

SSH connection seems to remain active after being disconnected from agent #2130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Tracked by #4978
mafredri opened this issue Jun 7, 2022 · 4 comments
Closed
Tracked by #4978
Labels
api Area: HTTP API cli Area: CLI site Area: frontend dashboard stale This issue is like stale bread.

Comments

@mafredri
Copy link
Member

mafredri commented Jun 7, 2022

When using SSH (ssh coder.workspace), the connection remains active after being disconnected from agent.

Steps to reproduce:

  1. coder create workspace
  2. ssh coder.workspace
  3. coder delete workspace (or stop, start)

After step 3, the SSH command remains running until user input. After the switch to Tailscale networking, this applies for both ssh using ProxyCommand and coder ssh. (Also applies to other commands using SSH, like sftp.)

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:

  1. Disconnect and exit
  2. Reconnect with a "Reconnected, but previous state was lost" (this is not a good message, just to illustrate)
@mafredri mafredri added bug cli Area: CLI labels Jun 7, 2022
@misskniss misskniss added api Area: HTTP API site Area: frontend dashboard labels Jun 14, 2022
@ketang
Copy link
Contributor

ketang commented Jun 22, 2022

I may have seen this with scp.

@github-actions

This comment was marked as outdated.

@github-actions github-actions bot added the stale This issue is like stale bread. label Aug 22, 2022
@mafredri mafredri removed the stale This issue is like stale bread. label Aug 22, 2022
@github-actions

This comment was marked as outdated.

@github-actions github-actions bot added the stale This issue is like stale bread. label Oct 22, 2022
@mafredri mafredri changed the title SSH connection seems to remain active after being disconnected from agent (ssh, not coder ssh) SSH connection seems to remain active after being disconnected from agent Oct 27, 2022
@mafredri mafredri removed the stale This issue is like stale bread. label Oct 27, 2022
@github-actions
Copy link

This issue is becoming stale. In order to keep the tracker readable and actionable, I'm going close to this issue in 7 days if there isn't more activity.

@github-actions github-actions bot added the stale This issue is like stale bread. label Dec 27, 2022
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Area: HTTP API cli Area: CLI site Area: frontend dashboard stale This issue is like stale bread.
Projects
None yet
Development

No branches or pull requests

4 participants