Registry / http-networking / jumpssh

jumpssh

JSON →
library1.6.5pypypi✓ verified 84d ago

JumpSSH is a Python library for executing remote SSH commands and transferring files through a jump host (gateway). Version 1.6.5 supports Python 3.9 and above, with releases approximately every 6 months. It leverages Paramiko for SSH connections and simplifies chaining sessions through multiple hosts.

pip install jumpssh
INSTALL
IMPORT
SIG · JUMPSSH
J
jumpssh
http-networkingpythonv1.6.5
Install
2.8s avg
Import
865ms
Disk
41MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
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
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.930s · 42.1MB
glibc
py 3.103.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()
Debug
Known issues
gotchaSSHSession objects may be garbage collected unexpectedly if not referenced, causing automatic session closure. This was fixed in 1.6.4, but ensure you maintain a reference to the session object to avoid premature closing.
fix
Upgrade to >= 1.6.4 or keep a strong reference (e.g., store in a list or variable) to prevent GC.
affects: < 1.6.4
breakingget_remote_session did not respect the 'timeout' parameter before version 1.6.4. If you rely on timeouts, upgrade or implement a workaround.
fix
Upgrade to >= 1.6.4 to ensure timeout is honored.
affects: 1.0.0 - 1.6.3
gotcharun_cmd can raise AuthenticationException if no SSH agent is running and no password/key is provided. This was fixed in 1.6.4 to fall back to other auth methods, but you should always provide credentials or have an agent running.
fix
Upgrade to >= 1.6.4 or ensure an SSH agent is running and keys are added.
affects: < 1.6.4
gotchaTransferring binary files with get() failed silently in versions before 1.6.0. The file would be corrupted. Always verify file transfers on older versions.
fix
Upgrade to >= 1.6.0 for proper binary file handling.
affects: < 1.6.0
Errors
Common errors & fixes
jumpssh.exceptions.AuthenticationException
No SSH agent running or no password/key provided. The library cannot authenticate.
fix
Ensure 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.
fix
Upgrade 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.
fix
Use: 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
Agent activity
8 hits · last 30 days
node
8
Resources