A terminal user interface for managing SSH keys, editing SSH configuration files, and auditing security—all from a single keyboard-driven screen. Most SSH setups remain scattered across a pile of files: keys stored in ~/.ssh, host entries in ~/.ssh/config, permissions guessed at, and no easy way to distinguish a strong key from a weak one. Keyward consolidates all of this behind one interface, eliminating the need to manually run ls and ssh-keygen -l across a disorganized directory.
See everything at once
Keyward displays every key with its type, size, fingerprint, and whether it is passphrase-protected. Instead of hunting through configuration files, the operator gets a unified view that makes it immediately clear which keys are protected, which are expired, and which may need rotation. This alone reduces the friction of SSH key maintenance.
Know if you're safe
A graded A–F security audit flags weak keys, missing passphrases, loose file permissions, and risky config directives, each with a concrete fix. Rather than guessing whether your setup is adequate, the operator receives a report card that tells exactly what needs attention. Weak keys are called out, absent passphrases are highlighted, and configuration issues are presented with actionable hints.
Edit config without breaking it
Editing ~/.ssh/config host-by-host includes validation and byte-identical round-trip serialization. Comments, spacing, and ordering survive untouched, and the last five versions are backed up automatically. This means an operator can refine configuration without fear of introducing syntax errors or losing previously working settings.
Encrypted by default
Key metadata (tags, notes) and full ~/.ssh backups are encrypted at rest with a key derived from the user's master password. No daemon runs in the background, no config file requires learning, and no network calls are made. The entire tool is a single static binary that works offline.
Key management
Discover, inspect, generate, rotate, and delete SSH keys (ed25519, rsa), with fingerprints, comments, and per-key tags and notes. The TUI provides a guided workflow for each operation, reducing the chance of accidental key deletion or misconfiguration.
Config editor
Edit ~/.ssh/config host-by-host with validation, comment toggling, and byte-identical round-trip serialization. Automatic backups keep the last five versions. Known hosts can be browsed (~/.ssh/known_hosts), including host, key type, fingerprint, @revoked, and @cert-authority markers, and forgotten in place; the file is rewritten atomically with its mode preserved.
Encrypted backups
age-encrypted .tar.age snapshots of the ~/.ssh directory plus key metadata, restorable from within the TUI. An encrypted metadata vault stores tags and notes at rest, unlocked by the master password. Backups can be written to a path via the command line for offline storage or transfer.
Headless subcommands
Beyond the interactive TUI, Keyward exposes commands for scripting, CI, and cron. The audit command can output text or JSON; list discovers SSH keys; import copies an external key into ~/.ssh with 0600 permissions; agent add loads a key into the running ssh-agent; agent list shows loaded keys; backup writes an encrypted ~/.ssh backup. In CI pipelines, the audit command can be gated with --fail-on to exit non-zero when a finding meets a specified severity, allowing the build to fail on critical issues.
Cryptography and versioning
Keyward encrypts metadata and backups with a master key derived from the password using argon2id → ChaCha20-Poly1305 → age identity. As of version 1.0.0, the project follows semantic versioning. On-disk formats (master.key, metadata.age, and .tar.age backups) and the command-line interface are stable: a vault created today works across all 1.x releases, and any breaking change would require a 2.0. The security-sensitive core depends only on filippo.io/age and golang.org/x/crypto; the terminal UI layer adds the Charm stack (bubbletea, bubbles, lipgloss).
Getting started
Installation options include brew install gateway-of-last-resort/tap/keyward or yay -S keyward-bin for macOS, pkg install keyward or building from the FreeBSD ports tree, manual download of the appropriate archive for the OS and architecture, or go install github.com/gateway-of-last-resort/keyward/cmd/keyward@latest for Go users. On first launch, a master password is set, creating an encrypted vault at ~/.keyward/master.key. Subsequent launches unlock with that password.
keyward audit --fail-on=critical # fail the build only on critical findings
keyward audit --json | jq '.grade' # machine-readable report
export KEYWARD_PASSWORD='…'
keyward backup --out /mnt/usb/ssh-backup.tar.age
Beyond the TUI, per-screen actions (generate, rotate, delete, copy public key, edit config, forget a known host, backup/restore, change master password) appear contextually in the footer. Tab and Shift+Tab cycle through screens: Keys → Audit → Config → Generate → Known Hosts → Backup → Settings. Arrow keys or j/k move within a list, Enter opens or confirms, Esc backs or cancels, and Ctrl+C quits from anywhere.
Warning: rotate, delete, and restore modify real files under ~/.ssh. To experiment safely, point Keyward at a throwaway directory—run it under a sandbox HOME or change the SSH directory in Settings before attempting destructive actions.