Replaces sshtunnel with a direct paramiko SSH tunnel - #496
Open
claudiubelu wants to merge 1 commit into
Open
Conversation
`sshtunnel` 0.4.0 (last release in 2021) references `paramiko.DSSKey` in
`get_keys()`, which was removed in `paramiko` 3.0. There is no maintained
version of `sshtunnel` that supports `paramiko` 3+.
Replace `SSHTunnelForwarder` with `_SSHTunnel`, a small class that implements
local-port-forwarding directly using `paramiko`'s
`Transport.open_channel('direct-tcpip', ...)`. The public interface
(`start` / `stop` / `local_bind_address`) is the same, so `_get_ssh_tunnel`
needs only minor keyword-argument changes.
Removes `sshtunnel` from `requirements.txt` and update the unit test to
patch `_SSHTunnel` instead of `SSHTunnelForwarder`.
Adds unit tests and an integration test exercising the _SSHTunnel.
claudiubelu
force-pushed
the
updates-ssh-tunnel
branch
from
August 13, 2026 10:43
663fc4e to
6fdfab4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
sshtunnel0.4.0 (last release in 2021) referencesparamiko.DSSKeyinget_keys(), which was removed inparamiko3.0. There is no maintained version ofsshtunnelthat supportsparamiko3+.Replace
SSHTunnelForwarderwith_SSHTunnel, a small class that implements local-port-forwarding directly usingparamiko'sTransport.open_channel('direct-tcpip', ...). The public interface (start/stop/local_bind_address) is the same, so_get_ssh_tunnelneeds only minor keyword-argument changes.Removes
sshtunnelfromrequirements.txtand update the unit test to patch_SSHTunnelinstead ofSSHTunnelForwarder.Adds unit tests and an integration test exercising the
_SSHTunnel.