SKM - SSH Keys Manager
SKM is a simple, lightweight, and powerful command-line tool built in Go, designed to help developers and system administrators effortlessly manage multiple SSH keys. If you frequently switch between different SSH identities for personal open-source projects, enterprise work repositories, or various remote servers, SKM automates the heavy lifting of organizing, switching, and backing up your keys.
The Problem SKM Solves
Managing multiple SSH keys natively is notoriously cumbersome. Usually, developers handle this by heavily modifying the ~/.ssh/config file with complex Host overrides, or by manually copying, renaming, and swapping id_rsa and id_rsa.pub files via the terminal.
These manual methods are error-prone. One wrong move can overwrite an important private key, lock you out of a server, or result in committing code with the wrong Git author identity.
SKM solves this by acting as a secure vault and symlink manager. It stores all your isolated key pairs in a dedicated "key store" (defaulting to ~/.skm) and securely symlinks your selected key directly into your active ~/.ssh directory.
Core Capabilities
- Lifecycle Management: Create, list, delete, and rename your SSH keys using human-readable aliases (e.g.,
work,github,aws-prod). - Seamless Switching: Set a specific SSH key as the system default instantly. SKM includes an interactive prompt UI for arrow-key navigation between profiles.
- Automated Environment Hooks: Execute custom shell scripts automatically whenever you switch keys (perfect for dynamically updating Git
user.nameanduser.email). - Remote Deployment: Easily push your current default SSH key to a remote host's
authorized_keysfile. - Agent Integration: Add or remove specific alias keys from your OS-level SSH agent cache to manage passphrases without friction.
- Resilient Backups: Export your keys to a
.tar.gzarchive, or utilize native Restic integration for encrypted, deduplicated, snapshot-based backups.
When to Use SKM
Use SKM if:
- You use the same hostname (e.g.,
github.com) but need to authenticate as different users depending on the project directory. - You want a foolproof way to backup and restore all your SSH identities when migrating to a new laptop.
- You want to tie SSH key changes to local system configuration changes (via Hooks).
Do not use SKM if:
- You only have a single SSH key for everything you do. Standard OpenSSH tools are sufficient for this.
Getting Started
Ready to organize your keys?
- Check out the Installation guide to get the SKM binary on your system.
- Head to the Quick Start to safely migrate your existing keys and configure your first alias.
- Explore the Commands section (e.g., Key Management) for detailed, scenario-based CLI usage.
- Learn about advanced automation in Configuration & Hooks.