| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A lightweight, agentless SSH key manager that just does the job.
Keymaster centralizes control of your authorized_keys files. Fed up with complex configuration management tools or manually scattering keys across your fleet? Keymaster is for you. It uses a simple SQLite database as the source of truth and a single "system key" per managed account to rewrite and version-control access. No agents to install on remote hosts, no complex server setup.
Keymaster features a modern, intuitive Terminal User Interface (TUI) that makes managing your keys a pleasure. The dashboard gives you a complete overview of your fleet's security posture at a glance.
🔑 Keymaster
An agentless SSH key manager that just does the job.
╭──────────────────────────────╮ ╭────────────────────────────────────────────────────────────────────────╮
│ │ │ │
│ Navigation │ │ System Status │
│ │ │ │
│ ▸ Manage Accounts │ │ Managed Accounts: 22 (22 active) │
│ Manage Public Keys │ │ Public Keys: 8 (4 global) │
│ Assign Keys to Accounts │ │ System Key: Active (Serial #3) │
│ Rotate System Keys │ │ │
│ Deploy to Fleet │ │ │
│ View Audit Log │ │ Deployment Status │
│ Audit Hosts │ │ │
│ View Accounts by Tag │ │ Hosts using current key: 21 │
│ Language │ │ Hosts using past key(s): 1 │
│ │ │ │
│ │ │ │
│ │ │ Security Posture │
│ │ │ │
│ │ │ Key-Type Spread: ecdsa-sha2-nistp256: 2, ssh-ed25519: 4, ssh-rsa: 2 │
│ │ │ │
│ │ │ │
│ │ │ Recent Activity │
│ │ │ │
│ │ │ 09-30T17:35 ROTATE_SYSTEM_KEY new_serial: 3 │
│ │ │ 09-30T00:51 TRUST_HOST hostname: 192.168.10.136 │
│ │ │ 09-30T00:51 ADD_ACCOUNT account: root@192.168.10.136 │
│ │ │ 09-30T00:49 TRUST_HOST hostname: 192.168.10.136 │
│ │ │ 09-30T00:49 TRUST_HOST hostname: 192.168.10.136 │
│ │ │ │
╰──────────────────────────────╯ ╰────────────────────────────────────────────────────────────────────────╯
j/k up/down: navigate enter: select q: quit L: language
go install github.com/toeirei/keymaster/cmd/keymaster@latestInitialize the Database: Run Keymaster for the first time. It will automatically create keymaster.db and a default keymaster.yaml in the standard user configuration directory.
For backward compatibility, it will also read an existing .keymaster.yaml from the current directory.
keymasterGenerate System Key: Inside the TUI, navigate to "Rotate System Keys" and follow the prompt. This generates the initial key Keymaster will use to manage your hosts.
Bootstrap Your First Host: This is where the magic happens.
Add the Account in Keymaster:
That's it! The host is now fully managed by Keymaster.
keymasterkeymaster deploykeymaster auditkeymaster trust-host user@new-hostkeymaster import /path/to/authorized_keyskeymaster export-ssh-client-config ~/.ssh/config# Create a compressed backup
keymaster backup
# Restore from a backup (non-destructive by default)
keymaster restore ./keymaster-backup.json.zst
# Migrate from SQLite to PostgreSQL
keymaster migrate --type postgres --dsn "host=localhost user=keymaster dbname=keymaster"# Remove entire authorized_keys file
keymaster decommission user@new-host
# Remove only Keymaster-managed content, keep other keys
keymaster decommission user@hostname --keep-file
# Decommission all accounts with a specific tag
keymaster decommission --tag env:staging
# Skip remote cleanup (database only)
keymaster decommission user@hostname --skip-remote
# Force decommission even if remote cleanup fails
keymaster decommission user@hostname --forceKeymaster provides a persistent -v / --verbose flag to enable internal verbose debug logging (including database debug messages). This is useful when diagnosing deployments or database operations. Examples:
keymaster -v deploy
keymaster --verbose auditKeymaster is designed for simplicity, and part of that design involves storing its own "system" private key in the database. This is what allows Keymaster to be truly agentless—it can connect to your hosts from any machine that has access to the database, without needing a separate ~/.ssh directory or SSH agent setup.
Here's how it works and what it means for security:
Treat your keymaster.db file as you would any sensitive secret, like a private key itself. Ensure it has strict file permissions (e.g., 0600) and is stored in a secure location. This trade-off—storing one private key for the sake of simplicity—is central to the Keymaster model.
For details on reporting security vulnerabilities, please see our Security Policy.
To minimize risk, Keymaster automatically applies strict restrictions to its system key upon every deployment. This prevents the key from being used for interactive shell access or other unintended purposes, even if the private key is compromised. This is not something you need to configure; Keymaster handles it for you to enforce the principle of least privilege.
When deployed, the Keymaster system key in the remote authorized_keys file will look like this and include the current system key serial in a header for traceability:
# Keymaster Managed Keys (Serial: 1)
command="internal-sftp",no-port-forwarding,no-x11-forwarding,no-agent-forwarding,no-pty ssh-ed25519 AAA... keymaster-system-key
What these options do:
This tool was born out of frustration. Existing solutions for SSH key management often felt like using a sledgehammer to crack a nut—requiring complex configuration, server daemons, and constant management. This is especially true for smaller teams or homelabs where simplicity is paramount.
Keymaster is different. It's built on a simple premise:
A tool should do the job without making you manage the tool itself.
It's designed for sysadmins and developers who want a straightforward, reliable way to control SSH access without the overhead. It's powerful enough for a fleet but simple enough for a home lab.
Keymaster is an open-source project, and contributions are always welcome! Whether it's reporting a bug, submitting a feature request, or writing code, we appreciate your help.
We are particularly looking for help with translations. If you speak a language other than English, you can easily contribute through our Weblate project.
Please read our Contributing Guidelines for details on our code conventions and the development process. All contributors are expected to follow our Code of Conduct.
This project is licensed under the MIT License - see the LICENSE file for details. For a detailed list of third-party dependencies and their license texts, please see the NOTICE.md file.
| Back | FazBrowse Home | New Git URL |