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.

@Dany9966 Dany9966 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM aside from the comments related to logging tunnel setup errors.

Comment thread coriolis/providers/replicator.py
Comment thread coriolis/providers/replicator.py
Comment thread requirements.txt
sqlalchemy<2.0.0
taskflow
webob
sshtunnel

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels good to remove dependencies :D

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

2 participants