sshconf
Lightweight SSH config library.
Decision gist · record as of 2026-08-14
Yes. sshconf is a straightforward, actively maintained tool with no dependencies, permissive licensing, and a clear use case. Install it if you need to read or modify SSH config files from Python code; skip it if you only work with SSH configs manually or through shell scripts.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- No runtime dependencies and a pure-Python wheel distribution keep installation friction minimal.
- The package is actively maintained with a recent commit history.
License · maintenance · safety
permissive license (permissive) — MIT license permits free use, modification, and distribution with minimal restrictions—suitable for most projects.
last release 2024-06-29 (776 days) · last repo commit 2026-03-30 · 102 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 500,008 downloads/mo, #6,323 on PyPI
Alternatives
Verify before relying
from sshconf import read_ssh_config
from os.path import expanduser
c = read_ssh_config(expanduser("~/.ssh/config"))
print(c.hosts())
c.set("myhost", Hostname="example.com", Port=22)
c.save()- Whether the library handles all SSH config directives and edge cases reliably in production use.
- Performance characteristics when working with very large or complex SSH config files.
What it is and what it does
sshconf is a lightweight library for reading and writing SSH configuration files programmatically. It parses the standard SSH config format and lets you query, add, modify, and remove host entries while preserving the file's original formatting and comments—important because SSH config files are often hand-edited and need to remain readable.
The library provides methods to read an existing config, inspect host settings, update individual hosts or create new ones, rename entries, and write changes back to the file or to a new file. It automatically detects indentation from existing config lines and handles multi-value directives like RemoteForward. Since it has no runtime dependencies and requires only Python 3.5 or later, it integrates easily into automation scripts, configuration management tools, or any application that needs to manage SSH access programmatically.
Use it for
- Automate SSH host configuration in deployment or infrastructure-as-code scripts.
- Build configuration management tools that need to update SSH settings without breaking manual edits.
- Generate SSH config entries dynamically from a database or API of hosts and credentials.
- Programmatically manage SSH tunnels, port forwards, or jump-host configurations.
- Parse and audit existing SSH configs to validate host settings or compliance policies.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
sshconf is a straightforward, actively maintained tool with no dependencies, permissive licensing, and a clear use case. Install it if you need to read or modify SSH config files from Python code; skip it if you only work with SSH configs manually or through shell scripts.
Install
sshconf on PyPI
Before you install
No runtime dependencies and a pure-Python wheel distribution keep installation friction minimal. The package is actively maintained with a recent commit history.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions—suitable for most projects.
Quickstart
from sshconf import read_ssh_config
from os.path import expanduser
c = read_ssh_config(expanduser("~/.ssh/config"))
print(c.hosts())
c.set("myhost", Hostname="example.com", Port=22)
c.save()
Verify before relying
- Whether the library handles all SSH config directives and edge cases reliably in production use.
- Performance characteristics when working with very large or complex SSH config files.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.5 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 776 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 500,008 / month, #6,323 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Topic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python Modules |
Evidence: sshconf-0.2.7-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “ssh config file parser”
- sshconfsshconf reads and modifies SSH config files while preserving their…
- fs.sshfsfs.sshfs provides a PyFilesystem2 interface to remote SSH/SFTP…
- sshpubkeysParses and validates OpenSSH public keys, extracting key type, bit…
Give your agent the search over MCP, or paste the wish link into any chat.
More Libraries packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.
Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
See also sshtunnel · fs.sshfs · netconf-client · parallel-ssh · sshfs · dvc-ssh · paramiko-expect · sshuttle · fabric · spur