{"id":23918,"library":"jumpssh","title":"JumpSSH","description":"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.","status":"active","version":"1.6.5","language":"python","source_language":"en","source_url":"https://github.com/AmadeusITGroup/JumpSSH","tags":["ssh","gateway","jump-host","paramiko","remote-execution","file-transfer"],"install":[{"cmd":"pip install jumpssh","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Core SSH library used for all connections","package":"paramiko","optional":false}],"imports":[{"note":"The SSHSession class is exposed at the package level, not in a submodule.","wrong":"from jumpssh.sessions import SSHSession","symbol":"SSHSession","correct":"from jumpssh import SSHSession"},{"note":"get_remote_session is a top-level function; it was never in utils.","wrong":"from jumpssh.utils import get_remote_session","symbol":"get_remote_session","correct":"from jumpssh import get_remote_session"}],"quickstart":{"code":"from jumpssh import SSHSession\n\n# Establish a session through a jump host\ngateway_session = SSHSession(\n    'jump.example.com',\n    username='jumpuser',\n    password=os.environ.get('JUMP_PASSWORD', '')\n)\n\n# Open a session to the target server via the gateway\nremote_session = gateway_session.get_remote_session(\n    'target.example.com',\n    username='targetuser',\n    password=os.environ.get('TARGET_PASSWORD', '')\n)\n\n# Execute a command\nresult = remote_session.run_cmd('echo hello', timeout=10)\nprint(result)\n\n# Transfer a file\nremote_session.get('/remote/path/file.txt', '/local/path/')\n\n# Close sessions\ngateway_session.close()\nremote_session.close()","lang":"python","description":"Connect to a target host through a jump host, run a command, and transfer a file."},"warnings":[{"fix":"Upgrade to >= 1.6.4 or keep a strong reference (e.g., store in a list or variable) to prevent GC.","message":"SSHSession 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.","severity":"gotcha","affected_versions":"< 1.6.4"},{"fix":"Upgrade to >= 1.6.4 to ensure timeout is honored.","message":"get_remote_session did not respect the 'timeout' parameter before version 1.6.4. If you rely on timeouts, upgrade or implement a workaround.","severity":"breaking","affected_versions":"1.0.0 - 1.6.3"},{"fix":"Upgrade to >= 1.6.4 or ensure an SSH agent is running and keys are added.","message":"run_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.","severity":"gotcha","affected_versions":"< 1.6.4"},{"fix":"Upgrade to >= 1.6.0 for proper binary file handling.","message":"Transferring binary files with get() failed silently in versions before 1.6.0. The file would be corrupted. Always verify file transfers on older versions.","severity":"gotcha","affected_versions":"< 1.6.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Ensure an SSH agent is running (ssh-agent) and add your private key, or provide password/pkey explicitly in the SSHSession constructor.","cause":"No SSH agent running or no password/key provided. The library cannot authenticate.","error":"jumpssh.exceptions.AuthenticationException"},{"fix":"Upgrade to latest version: pip install --upgrade jumpssh. In older versions, use SSHSession.get_remote_session() method on a gateway session instead.","cause":"Using an older version (< 1.2.0?) where get_remote_session was not yet available or was renamed.","error":"ImportError: cannot import name 'get_remote_session' from 'jumpssh'"},{"fix":"Use: from jumpssh import SSHSession. If using an old version, upgrade: pip install --upgrade jumpssh.","cause":"Trying to import from a submodule incorrectly (e.g., from jumpssh.sessions import SSHSession) or an older version where the API was different.","error":"AttributeError: module 'jumpssh' has no attribute 'SSHSession'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}