Skip to content

Replaces sshtunnel with a direct paramiko SSH tunnel - #496

Open
claudiubelu wants to merge 1 commit into
cloudbase:masterfrom
claudiubelu:updates-ssh-tunnel
Open

Replaces sshtunnel with a direct paramiko SSH tunnel#496
claudiubelu wants to merge 1 commit into
cloudbase:masterfrom
claudiubelu:updates-ssh-tunnel

Conversation

@claudiubelu

@claudiubelu claudiubelu commented Aug 13, 2026

Copy link
Copy Markdown
Member

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.

`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.
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.

1 participant