Skip to content
devticalPublic

About

Checking for existing SSH keys

Topics

Resources

Code of conduct

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

 

History

57 Commits

Folders and files

Repository files navigation

MySSH

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.

Cover

Installation

You can install MySSH using Homebrew:

Step 1: Add the formula to Homebrew

If this is your first time installing from the devtical tap, you'll need to add it:

brew tap devtical/formulae

Step 2: Install MySSH

After adding the tap, install MySSH by running:

brew install devtical/formulae/myssh

You can also build from source with Rust 2021 edition:

cargo install --path .

Usage

Interactive mode

Run myssh without arguments to open the TUI:

myssh

Select 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.

CLI commands

# 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_ed25519

Custom SSH directory

By default, MySSH reads from ~/.ssh. To use a different directory:

myssh --ssh-dir /path/to/ssh list

Or set the environment variable:

export MYSSH_DIR=/path/to/ssh
myssh list

License

This project is licensed under the Apache License 2.0. See the LICENSE file for more details.

About

Checking for existing SSH keys

Topics

Resources

Code of conduct

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages