Skip to content

fix stale SSH connections on server#23

Open
clive-jevons wants to merge 1 commit into
elliotchance:masterfrom
clive-jevons:fix-stale-ssh-connections
Open

fix stale SSH connections on server#23
clive-jevons wants to merge 1 commit into
elliotchance:masterfrom
clive-jevons:fix-stale-ssh-connections

Conversation

@clive-jevons

@clive-jevons clive-jevons commented Dec 18, 2024

Copy link
Copy Markdown

We are using the sshtunnel library for a cli tool for operations and noticed that we were ending up with many stale ssh connections being held on our remote hosts.

This PR changes a few things

  • we only keep one SSH client open
  • each local/remote pair is closed when copying stops between them
  • the cleanup is made to accomodate the new setup

This change is Reviewable

we are using the sshtunnel library for a cli tool for operations and noticed that we were ending up with many stale ssh connections being held on our remote hosts.
This PR changes a few things - we only keep one SSH client open, each local/remote pair is closed when copying stops between them, the cleanup is made to accomodate the new setup
@elliotchance

Copy link
Copy Markdown
Owner

I'm hesitant to accept this considering how it might change the backwards compatibility. I would suggest adding an option to SSHTunnel so it can be enabled.

@clive-jevons

Copy link
Copy Markdown
Author

@elliotchance <- I've created #24 in order to pull out the ssh client management in a first step, and if it looks good to you and we can merge that then I'd rework this PR on top of that PR to provide a parallel implementation which can be activated by a feature flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants