Paramiko

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

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

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
66 /100 Good
Development Activity 52
Maintenance 20
Community 92
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
74 /100 Good
Architecture 82
Code Quality 76
Innovation 74
Learning Curve 65

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
47%
Other

Airbyte

Data Engineering · Developer Tools

22,143

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
Python 47%
Kotlin 43%
Updated 5 days ago
Python
89%
Apache 2.0

Apache Airflow

Data Engineering

46,995

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
64
Dependency
Built with
Python 89%
Updated 5 days ago
Python
55%
Other

authentik

Authentication · Security

25,758

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
66
Dependency
Built with
Python 55%
TypeScript 36%
Updated 5 days ago
Go
84%
AGPL 3.0

Beta9

AI Development · Automation · Data Engineering

1,794

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
66
Dependency
Built with
Go 84%
Python 15%
Updated 6 days ago
C++
68%
Apache 2.0

ClickHouse

Analytics · Data Engineering · Databases

50,116

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
64
Dependency
Built with
C++ 68%
Python 14%
Updated 5 days ago
Python
90%
MIT

Cronboard

Developer Tools · Devops

1,456

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

View details
79
Repo Health
74
Technical
75
Dependency
Built with
Python 90%
Updated 1 weeks ago
Python
56%
MIT

Foxel

File Storage

1,063

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

View details
62
Repo Health
68
Technical
77
Dependency
Built with
Python 56%
TypeScript 41%
Updated 2 weeks ago
Python
64%
Other

Keep

Automation · Devops · Monitoring

12,359

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
89
Repo Health
79
Technical
66
Dependency
Built with
Python 64%
TypeScript 36%
Updated 2 weeks ago
Python
55%
Other

PostHog

Ab Testing Experimentation · Analytics · Developer Tools

39,975

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
65
Dependency
Built with
Python 55%
TypeScript 36%
Updated 5 days ago

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