Install & Compatibility
Where this runs
tested against v1.6.5 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.930s · 42.1MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 2.8s · import 0.800s · 42MB
41MB installed
● package 41MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
SSHSession
✓ from jumpssh import SSHSession
✗ from jumpssh.sessions import SSHSession
The SSHSession class is exposed at the package level, not in a submodule.
get_remote_session
✓ from jumpssh import get_remote_session
✗ from jumpssh.utils import get_remote_session
get_remote_session is a top-level function; it was never in utils.
Connect to a target host through a jump host, run a command, and transfer a file.
from jumpssh import SSHSession
# Establish a session through a jump host
gateway_session = SSHSession(
'jump.example.com',
username='jumpuser',
password=os.environ.get('JUMP_PASSWORD', '')
)
# Open a session to the target server via the gateway
remote_session = gateway_session.get_remote_session(
'target.example.com',
username='targetuser',
password=os.environ.get('TARGET_PASSWORD', '')
)
# Execute a command
result = remote_session.run_cmd('echo hello', timeout=10)
print(result)
# Transfer a file
remote_session.get('/remote/path/file.txt', '/local/path/')
# Close sessions
gateway_session.close()
remote_session.close()
Errors
Common errors & fixes
jumpssh.exceptions.AuthenticationException
No SSH agent running or no password/key provided. The library cannot authenticate.
fixEnsure an SSH agent is running (ssh-agent) and add your private key, or provide password/pkey explicitly in the SSHSession constructor.
ImportError: cannot import name 'get_remote_session' from 'jumpssh'
Using an older version (< 1.2.0?) where get_remote_session was not yet available or was renamed.
fixUpgrade to latest version: pip install --upgrade jumpssh. In older versions, use SSHSession.get_remote_session() method on a gateway session instead.
AttributeError: module 'jumpssh' has no attribute 'SSHSession'
Trying to import from a submodule incorrectly (e.g., from jumpssh.sessions import SSHSession) or an older version where the API was different.
fixUse: from jumpssh import SSHSession. If using an old version, upgrade: pip install --upgrade jumpssh.
Upgrade
Version history
1.6.5latest on PyPI · released Nov 6, 2020
Audit
Dependencies
paramikorequiredCore SSH library used for all connections