Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

SSHCnfgr

English speaker? Jump to the English Summary at the bottom.

License: MIT Python 3.12+ Status: Beta

SSHCnfgr verwaltet deine OpenSSH-Hosts, Gruppen und Identities über eine einzige, saubere TOML-Datei (~/.ssh/sshcnfgr.toml) — per Textual-TUI, optionaler Qt6-Desktop-GUI (Wayland/X11/macOS/Windows) oder Click-CLI.

Highlights

  • Eine einzige Datei neben ~/.ssh/config: Alles liegt in ~/.ssh/sshcnfgr.toml (auf Linux/macOS automatisch mit 0600-Rechten, unter Windows in %USERPROFILE%\.ssh\sshcnfgr.toml) — ideal für den direkten Start per uvx.
  • TOML als Source of Truth: Deaktivierte Hosts bleiben in der Datenbank erhalten, landen aber nicht in der generierten OpenSSH-Config (~/.ssh/config.generated, ebenfalls 0600).
  • Dubletten finden & zusammenführen: Erkennt Hosts mit gleichem Ziel (HostName + effektiver Port + effektiver User), zeigt Feld-Konflikte übersichtlich an und führt Einträge interaktiv zusammen (übrige Dubletten wahlweise deaktivieren oder löschen).
  • TUI, Qt6-GUI & CLI: Im Terminal mit Textual, auf dem Desktop optional mit PySide6/Qt6 (Live-Suche, Gruppen-/Identity-Tabs, extra_options-Editor, Config-Vorschau) oder skriptbar über die CLI.
  • Sicherheitsnetz: Keine Speicherung privater Schlüssel-Inhalte (nur Pfade & .pub-Metadaten), atomares Schreiben und automatische Zeitstempel-Backups (*.bak.YYYYMMDD-HHMMSS) vor jedem Überschreiben.

Schnellstart mit uv / uvx

Hinweis zur Beta-Version (0.1.0b1): Da es sich um eine Vorabversion handelt, benötigt uvx / uv tool install aktuell das Flag --prerelease=allow. Ab dem regulären 0.1.0-Release entfällt dieses Flag.

Ohne Installation direkt ausführen (uvx)

# Textual-TUI direkt starten (legt ~/.ssh/sshcnfgr.toml bei Bedarf an)
uvx --prerelease=allow sshcnfgr

# Optionale Qt6 Desktop-GUI starten (Wayland / X11 / macOS / Windows)
uvx --prerelease=allow --from "sshcnfgr[qt]" sshcnfgr gui

# Bestehende ~/.ssh/config importieren
uvx --prerelease=allow sshcnfgr import --source ~/.ssh/config

Dauerhaft als CLI-Tool installieren (uv tool install)

# Terminal-Version (TUI + CLI)
uv tool install --prerelease=allow sshcnfgr

# Inklusive Qt6 Desktop-GUI
uv tool install --prerelease=allow "sshcnfgr[qt]"

# Danach direkt nutzbar:
sshcnfgr            # startet die TUI
sshcnfgr gui        # startet die Qt6-GUI
sshcnfgr --help     # zeigt alle Kommandos

(Falls uv noch nicht installiert ist: curl -LsSf https://astral.sh/uv/install.sh | sh auf Linux/macOS bzw. powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" unter Windows.)


Typischer Ablauf

  1. Vorhandene SSH-Config importieren (deine ~/.ssh/config wird nur gelesen):
    sshcnfgr import --source ~/.ssh/config
    
  2. Lokale SSH-Keys erfassen (nur Pfade & .pub-Vorschau, keine Private Keys):
    sshcnfgr identities scan
    
  3. Hosts pflegen & Dubletten aufräumen:
    • In der TUI (sshcnfgr) mit Ctrl+U oder Button „Dubletten“
    • Oder in der Qt6-GUI (sshcnfgr gui) über „Dubletten…“ (Ctrl+U)
  4. OpenSSH-Config erzeugen:
    sshcnfgr generate
    
    Standard-Ausgabe ist ~/.ssh/config.generated (0600). Du kannst sie direkt per Include in deiner ~/.ssh/config einbinden:
    Include config.generated
    

CLI-Übersicht

sshcnfgr                                              # TUI direkt starten
sshcnfgr tui                                          # TUI starten
sshcnfgr gui                                          # Qt6 Desktop-GUI starten ([qt]-Extra)
sshcnfgr import --source ~/.ssh/config                # OpenSSH-Config importieren
sshcnfgr generate --output ~/.ssh/config.generated    # OpenSSH-Config generieren
sshcnfgr identities scan                              # Keys aus ~/.ssh erfassen
sshcnfgr identities list                              # Bekannte Identities anzeigen
sshcnfgr groups set-identity prod id_ed25519          # Gruppen-Default-Identity setzen
sshcnfgr --version                                    # Version anzeigen

Optionales File-Logging (Standard: keine Logdatei):

sshcnfgr --verbose --log-file /tmp/sshcnfgr.log generate

Dateien & Migration

Datei Zweck
~/.ssh/sshcnfgr.toml Zentrale Source of Truth (Hosts, Gruppen, Identities, global_options, [ui]), 0600 auf POSIX
~/.ssh/config.generated Generierte OpenSSH-Config (nur aktive Hosts, Host * am Ende), 0600 auf POSIX
*.bak.YYYYMMDD-HHMMSS Automatisches Zeitstempel-Backup vor jedem Überschreiben

Migration aus 0.1.0a1: Falls ~/.ssh/sshcnfgr.toml noch nicht existiert, aber noch eine ältere ~/.config/sshcnfgr/hosts.toml vorhanden ist, lädt SSHCnfgr diese automatisch und schreibt beim nächsten Speichern nach ~/.ssh/sshcnfgr.toml.


Entwicklung & Release

git clone https://github.com/thomsbe/SSHCnfgr.git
cd SSHCnfgr
uv sync --extra dev --extra qt

# Linting & Tests (inkl. Textual Pilot & Qt6 Offscreen)
uv run ruff check .
QT_QPA_PLATFORM=offscreen uv run pytest -v

Paket bauen & auf PyPI veröffentlichen

uv build
uv run twine check dist/*
uv publish

Weitere Dokumente: CHANGELOG.md, SECURITY.md, CONTRIBUTING.md, LICENSE (MIT).


English Summary

SSHCnfgr is a cross-platform (Linux, macOS, Windows) manager for OpenSSH host configurations backed by a single TOML file (~/.ssh/sshcnfgr.toml, 0600 permissions on POSIX) located right next to ~/.ssh/config.

Key Features

  • Single source of truth: Manage hosts, groups, identity profiles, and global defaults in ~/.ssh/sshcnfgr.toml and generate clean OpenSSH configs (~/.ssh/config.generated) containing only enabled hosts.
  • Duplicate detection & interactive merge: Finds hosts pointing to the same effective (HostName, Port, User) target, highlights field conflicts, merges non-conflicting attributes, and lets you disable or delete duplicates safely.
  • Three interfaces: Interactive Textual TUI (default), optional Qt6 desktop GUI (PySide6-Essentials, Wayland/X11/macOS/Windows), and Click CLI.
  • Safe by design: Never reads or stores private SSH key contents; writes atomically with 0600 permissions and creates timestamped backups before overwriting.

Quickstart

# Run directly with uvx (during 0.1.0b1 beta, pass --prerelease=allow)
uvx --prerelease=allow sshcnfgr
uvx --prerelease=allow --from "sshcnfgr[qt]" sshcnfgr gui

# Or install globally as a tool
uv tool install --prerelease=allow sshcnfgr
uv tool install --prerelease=allow "sshcnfgr[qt]"

# Import existing OpenSSH config & generate
sshcnfgr import --source ~/.ssh/config
sshcnfgr generate

Licensed under the MIT License. See SECURITY.md for security reporting and CONTRIBUTING.md for development details.

Metadata

Release files for sshcnfgr 0.1.0b1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sshcnfgr 0.1.0b1
File Size Uploaded Provenance Actions
sshcnfgr-0.1.0b1.tar.gz 40.7 kB Without provenance Details for sshcnfgr-0.1.0b1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sshcnfgr 0.1.0b1
File Interpreter ABI Platform Actions
sshcnfgr-0.1.0b1-py3-none-any.whl Python 3 none any Details for sshcnfgr-0.1.0b1-py3-none-any.whl

Total release size: 87.3 kB

Release files / sshcnfgr-0.1.0b1.tar.gz

Download URL sshcnfgr-0.1.0b1.tar.gz
Size 40.7 kB
Tags Source
SHA-256 checksum
How to use checksums
119ef4b919c8147ed6b2c0b5d30a370899df1e281cc3932db59bec0980f91d77
BLAKE2b-256 checksum
How to use checksums
294c8ea4230fd1ea5f4de7ce6d0fa135be60daba96d93398e0d408b68d7b25cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Linux Mint","version":"22.3","id":"zena","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / sshcnfgr-0.1.0b1-py3-none-any.whl

Download URL sshcnfgr-0.1.0b1-py3-none-any.whl
Size 46.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3d3698f2505036023f2b8b91b611cd236bcd08df7aa3093bea7d82bfb4f8615d
BLAKE2b-256 checksum
How to use checksums
9038078b376bc50c26a790fecf6c8be699a840c601f4d24a9350ac360c707c7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Linux Mint","version":"22.3","id":"zena","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for sshcnfgr 0.1.0b1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page