sshtunnel
Pure python SSH tunnels
Install
sshtunnel on PyPI
pip
pip install sshtunneluv
uv add sshtunnelpoetry
poetry add sshtunnelPackage facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — paramiko |
| Maintenance | aging — 2,040 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: sshtunnel-0.4.0-py2.py3-none-any.whl
Keywords: ssh, tunnel, paramiko, proxy, tcp-forward
About sshtunnel
from the package's own PyPI description — quoted content, verbatim
|CircleCI| |AppVeyor| |readthedocs| |coveralls| |version|
|pyversions| |license|
Author: Pahaz_
Repo: https://github.com/pahaz/sshtunnel/
Inspired by https://github.com/jmagnusson/bgtunnel, which doesn't work on Windows.
See also: https://github.com/paramiko/paramiko/blob/master/demos/forward.py
Requirements
paramiko_
Installation
sshtunnel_ is on PyPI, so simply run:
::
pip install sshtunnel
or ::
easy_install sshtunnel
or ::
conda install -c conda-forge sshtunnel
to have it installed in your environment.
For installing from source, clone the
repo <https://github.com/pahaz/sshtunnel>_ and run::
python setup.py install
Testing the package
In order to run the tests you first need
tox <https://testrun.org/tox/latest/>_ and run::
python setup.py test
Usage scenarios
One of the typical scenarios where sshtunnel is helpful is depicted in the
figure below. User may need to connect a port of a remote server (i.e. 8080)
where only SSH port (usually port 22) is reachable. ::
----------------------------------------------------------------------...
Read as markdown · JSON record · Source repository · Homepage
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
sshtunnel creates SSH port forwarding tunnels in pure Python, allowing you to reach services behind firewalls or on private networks by routing connections through an SSH server.
Low friction: pure-Python wheel with a single runtime dependency (paramiko). However, the package is aging—last release was 2021-01-11, over 4 years old, and the repo shows no recent commits despite being active on GitHub (1295 stars). Maintenance status is uncertain for modern Python versions.
MIT license (permissive) means you can use, modify, and distribute sshtunnel freely in commercial and private projects, provided you retain the license notice.
Usage
pip install sshtunnel
from sshtunnel import SSHTunnelForwarder
server = SSHTunnelForwarder(
'remote.host',
ssh_username='user',
ssh_password='pass',
remote_bind_address=('127.0.0.1', 8080)
)
server.start()
print(server.local_bind_port)
server.stop()
Requires paramiko and its system-level dependencies (libffi, libssl); SSH server must be reachable on the specified host and port.
Verdict: sshtunnel is a stable, low-friction tool for SSH tunneling with no known vulnerabilities and permissive licensing. However, it has not been actively maintained since early 2021—over four years old—and classifiers indicate alpha status. Suitable for established use cases, but consider whether the package's age and lack of recent updates align with your project's maintenance expectations.
Needs verification
- Whether paramiko's own security and maintenance status should influence adoption decisions for sshtunnel.
- Whether the package's alpha classifier reflects actual stability or is outdated metadata.
- Compatibility with Python versions beyond 3.8 (classifiers stop there; current Python is 3.12+).
Similar packages
copyleft · top 1,000 on PyPI
pyodbcpermissive · top 1,000 on PyPI
giturlparsepermissive · top 1,000 on PyPI
types-paramikopermissive · top 1,000 on PyPI
defusedxmlpermissive · top 1,000 on PyPI
tldextractpermissive · top 1,000 on PyPI
fastapi-clipermissive · top 1,000 on PyPI
PySockspermissive · top 1,000 on PyPI
pinotdbpermissive · top 1,000 on PyPI
universal-pathlibpermissive · top 1,000 on PyPI