Paramiko

Pure-Python SSHv2 client and server library for secure remote shells, commands, and file transfer.

Library
PyPI
v5.0.0
9,829stars
GNU LGPLv2.1

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
52/100Fair
Development Activity16
Maintenance0
Community92
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
74/100Good
Architecture82
Code Quality76
Innovation74
Learning Curve65

Paramiko is a pure-Python implementation of the SSHv2 protocol, providing both client and server functionality for secure remote command execution, interactive shells, and SFTP file transfer. It underpins higher-level tools like Fabric and is the SSH engine inside many DevOps and infrastructure-automation projects.

Because it’s written entirely in Python, with cryptographic primitives delegated to the cryptography and PyNaCl libraries, Paramiko runs anywhere CPython does without requiring an OpenSSH binary on the host. It exposes low-level primitives, transports, channels, key types, key exchange algorithms, for teams that need fine control, while SSHClient offers a batteries-included high-level API for the common case of connecting and running commands.

What You Get

  • A high-level SSHClient for connecting, authenticating, and running remote commands in a few lines
  • SFTP client and server implementations for programmatic file transfer
  • Key generation, loading, and agent support for RSA, DSA, ECDSA, and Ed25519 keys
  • Low-level Transport and Channel primitives for building custom SSH-based protocols
  • An in-Python ServerInterface for implementing your own SSH or SFTP server

Common Use Cases

  • Automating remote command execution across a fleet of Linux servers
  • Building deployment and provisioning scripts that need SSH without invoking a subprocess
  • Transferring files to and from remote hosts programmatically via SFTP
  • Embedding an SSH server inside a Python application for remote administration

Under The Hood

Architecture

Paramiko is organized around a layered SSH2 stack: Transport (transport.py, 3,300+ lines) owns the socket, runs the packet read/write loop in its own thread, negotiates key exchange (kex_curve25519.py, kex_ecdh_nist.py, kex_gex.py, kex_group14/16.py), and multiplexes Channel objects (channel.py) over a single encrypted connection. AuthHandler/AuthStrategy (auth_handler.py, auth_strategy.py) handle the userauth phase against password, public-key, or keyboard-interactive methods. On top of this, SSHClient (client.py) is a facade that wires host-key policy (RejectPolicy/AutoAddPolicy), Transport construction, and Channel exec into a few high-level methods (connect, exec_command). SFTP is a parallel subsystem (sftp.py, sftp_client.py, sftp_server.py, sftp_handle.py) implemented as a request/response protocol running inside a dedicated SSH channel, independent of the shell/exec channel path. Key material (pkey.py, rsakey.py, ecdsakey.py, ed25519key.py) is abstracted behind a common PKey interface so Transport and SSHClient can treat all key types uniformly.

Tech Stack

Paramiko 5.0.0 targets Python >=3.9 and depends on cryptography>=3.3 for AES/RSA/ECDSA primitives (via cryptography.hazmat), bcrypt>=3.2 for key derivation, pynacl>=1.5 for Ed25519/Curve25519, and invoke>=2.0 for its own task runner. It has zero pure-Python crypto: all cipher/kex/hash operations go through cryptography’s Rust/C bindings, which is also why the project ships precompiled wheels rather than vendoring crypto code. Dev tooling (pyproject.toml dependency-groups) uses pytest-relaxed, flake8, a pinned black==22.12.0, codespell, and coverage, a traditional if slightly dated Python toolchain. Distribution is a single paramiko package with no compiled extensions of its own.

Code Quality

The test suite (24 files under tests/) is substantial: test_client.py alone defines 35+ test functions covering SSHClient connection, auth failure paths, host-key policies, and banner timeouts, using a real in-process NullServer/ServerInterface pair over a loopback socket rather than mocks, which gives good protocol-level coverage. Tests use pytest with pytest-relaxed and include fixture key files for every supported key type (RSA/DSA/ECDSA/Ed25519, with and without passwords). Code style is enforced via flake8 plus pinned black, and modules consistently raise explicit ssh_exception.py types (AuthenticationException, SSHException, NoValidConnectionsError) rather than bare exceptions. The codebase is old (started 2009) and shows it in places, repeated GPL-style file headers, no type hints, but naming and module boundaries stay disciplined.

API Design

The two-tier API is Paramiko’s main developer-experience win: SSHClient covers the common case (connect() plus exec_command() in a few lines, with context-manager support via ClosingContextManager), while Transport/Channel are exposed directly for anyone needing raw control over kex algorithms, window sizes, or custom channel types. Docstrings are present on nearly every public method and versioned with .. versionadded:: markers, and the README explicitly steers common use-cases toward Fabric instead of raw Paramiko, which is an honest signal about where the low-level API adds friction. The main cost for newcomers is that a working connection requires understanding host-key verification policy up front, since RejectPolicy is the secure default and will silently reject unknown hosts until a policy is set, a real first-run stumbling block the docs address but don’t eliminate.

Used by 12 apps in this directory

Python
49%
Other

Airbyte

Developer Tools · Data Engineering

21,916

Open-source ELT platform with 600+ connectors for moving data from any source to warehouses, lakes, and AI agents.

View details
95
Repo Health
80
Technical
67
Dependency
Built with
Python49%
Kotlin42%
Updated today
Python
90%
Apache 2.0

Apache Airflow

Data Engineering

46,530

Define, schedule, and monitor complex data workflows as Python code — with a powerful UI, 80+ provider integrations, and battle-tested scalability across thousands of production deployments.

View details
96
Repo Health
89
Technical
66
Dependency
Built with
Python90%
Updated today
Python
54%
Other

authentik

Authentication · Security

24,980

The self-hosted Identity Provider that replaces Okta, Auth0, and Entra ID with a unified SSO platform supporting SAML, OAuth2/OIDC, LDAP, RADIUS, and WebAuthn.

View details
92
Repo Health
81
Technical
68
Dependency
Built with
Python54%
TypeScript33%
Updated today
Go
82%
AGPL 3.0

Beta9

Developer Tools · AI Development · Data Engineering

1,746

Run AI workloads at scale with a Pythonic serverless runtime that handles GPU inference, background jobs, and sandboxes with zero infrastructure overhead.

View details
85
Repo Health
78
Technical
69
Dependency
Built with
Go82%
Python17%
Updated today
C++
69%
Apache 2.0

ClickHouse

Databases · Analytics · Data Engineering

49,325

Open-source column-oriented database that delivers real-time analytical queries on petabyte-scale data with millisecond latency.

View details
95
Repo Health
90
Technical
68
Dependency
Built with
C++69%
Python13%
Updated today
Python
91%
MIT

Cronboard

Developer Tools · Devops

1,437

A keyboard-driven terminal dashboard for managing cron jobs on local machines and remote servers via SSH.

View details
76
Repo Health
74
Technical
75
Dependency
Built with
Python91%
Updated 3 weeks ago
Python
56%
MIT

Foxel

File Storage

1,046

Self-hosted private cloud storage with AI semantic search and a pluggable multi-backend file management system.

View details
60
Repo Health
68
Technical
76
Dependency
Built with
Python56%
TypeScript41%
Updated 2 weeks ago
Python
63%
Other

Keep

Devops · Automation · Monitoring

12,224

The open-source AIOps and alert management platform that unifies 130+ monitoring tools into a single pane of glass with AI-powered correlation, deduplication, and workflow automation.

View details
91
Repo Health
79
Technical
67
Dependency
Built with
Python63%
TypeScript36%
Updated today
Python
55%
Other

PostHog

Analytics · Monitoring · Developer Tools

37,777

The all-in-one open source product platform combining analytics, session replay, feature flags, error tracking, AI observability, and a built-in data warehouse in a single self-hostable stack.

View details
92
Repo Health
80
Technical
67
Dependency
Built with
Python55%
TypeScript36%
Updated today

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search