MySSH is a terminal tool to inspect and manage SSH keys in your .ssh directory. It provides an interactive TUI for browsing keys and a CLI for scripting and automation.
You can install MySSH using Homebrew:
If this is your first time installing from the devtical tap, you'll need to add it:
brew tap devtical/formulaeAfter adding the tap, install MySSH by running:
brew install devtical/formulae/mysshYou can also build from source with Rust 2021 edition:
cargo install --path .Run myssh without arguments to open the TUI:
mysshSelect a key to view its details, including the public key, fingerprint, and permissions. From the detail view you can copy the public key or reveal the private key. Press q to quit.
# List all private keys
myssh list
myssh list --json
# Show key details (metadata, fingerprint, public key)
myssh show id_ed25519
myssh show id_ed25519 --private # also print the private key
# Show fingerprint only
myssh fingerprint id_ed25519
myssh fingerprint id_ed25519 --json
# Generate a new key pair
myssh generate
myssh generate --name my_key --algorithm ed25519 --comment "user@host"
myssh generate --algorithm rsa # saved as id_rsa
myssh generate --name my_key --passphrase # prompts for a passphrase
MYSSH_PASSPHRASE=secret myssh generate --name my_key --passphrase # non-interactive
# ssh-agent integration
myssh add id_ed25519 # on macOS, also stores the passphrase in Keychain
myssh remove id_ed25519
myssh agent-list
# Import and export key pairs
myssh export id_ed25519 ~/backup/
myssh import ~/backup/ # if the folder holds exactly one private key
myssh import ~/backup/ --name id_ed25519By default, MySSH reads from ~/.ssh. To use a different directory:
myssh --ssh-dir /path/to/ssh listOr set the environment variable:
export MYSSH_DIR=/path/to/ssh
myssh listThis project is licensed under the Apache License 2.0. See the LICENSE file for more details.
