A kitty kitten plugin that integrates with macOS Keychain for SSH connection management with fuzzy finding capabilities.
- 🔐 Stores SSH credentials securely in macOS Keychain
- 🔍 Uses
fzffor fast fuzzy finding of SSH connections - 🚀 Automatically connects to SSH and enters password
- 📋 Paste password only with
ctrl+E(without auto-connecting) - ✨ Simple interface for adding new SSH connections
- 🗑️ Delete connections with
ctrl+Dand confirmation - 🔄 Loops back to selection menu after create/delete operations
- 🛡️ No credential storage in plain text files
- 🏷️ Friendly names for SSH connections (e.g., "production-server" → user@host)
- macOS (uses
securitycommand) - kitty terminal
- fzf - Install with:
brew install fzf
-
Copy
ssh_manager.pyto your kitty config directory:cp ssh_manager.py ~/.config/kitty/ -
Add a keyboard mapping to your
kitty.conf:map ctrl+shift+s kitten ssh_manager.py -
Reload kitty configuration or restart kitty.
- Press
Ctrl+Shift+S(or your configured shortcut) - Type a friendly name for the connection in the fzf prompt (e.g., "production-server")
- Press
Enter - Enter the SSH username when prompted
- Enter the SSH hostname when prompted
- Enter the password (input is hidden)
- Confirm the password
- The connection is now stored in your macOS Keychain
- You'll be returned to the fzf menu to select another action or connect
- Press
Ctrl+Shift+S(or your configured shortcut) - Use fzf to search and select an existing SSH connection
- Press
Enter - The SSH connection command is automatically executed
- The password is automatically entered when prompted
- Press
Ctrl+Shift+S(or your configured shortcut) - Use fzf to search and select an existing SSH connection
- Press
Ctrl+Einstead of Enter - The password is pasted to your terminal without pressing Enter
- You'll be returned to the fzf menu
- Press
Ctrl+Shift+S(or your configured shortcut) - Use fzf to search and select the connection you want to delete
- Press
Ctrl+Dinstead of Enter - Review the warning message showing the connection details
- Press
Enterto confirm deletion, or typenoto cancel - The connection is permanently removed from your keychain
- You'll be returned to the fzf menu
Enter- Connect to selected SSH server (auto-enter password)Ctrl+D- Delete selected connection (with confirmation)Ctrl+E- Paste password only (without connecting)Ctrl+C- Cancel and exit
- All SSH credentials are stored in macOS Keychain under the account name
kitty-ssh - The service name format is:
friendly-name|username@hostname - When you select a connection, the script executes
kitty +kitten sshwith auto-password entry - When you press
Ctrl+E, only the password is pasted (useful for manual SSH commands) - After creating or deleting a connection, you're returned to the fzf menu to perform another action
- The script automatically detects the password prompt and fills it in
- SSH credentials are stored securely in macOS Keychain, not in plain text files
- Password input is hidden when creating new entries
- Password confirmation is required when creating new entries
- Uses macOS's native security mechanisms
- Auto-password entry uses screen content detection to find the password prompt
- Connects with
StrictHostKeyChecking=nofor convenience (can be modified in script)
- Uses
security add-generic-passwordto store SSH credentials - Uses
security find-generic-passwordto retrieve passwords - Uses
security delete-generic-passwordto remove credentials - Uses
security dump-keychainto list available connections - Integrates with kitty's remote control API to execute SSH commands and paste passwords
- Automatically detects fzf in Homebrew paths (both Intel and Apple Silicon)
- Handles shell environment variables to ensure PATH includes common tool locations
- Implements kitty's kitten interface with proper input handling
- Uses kitty's screen content reading API to detect password prompts
- Delete confirmation defaults to "yes" (press Enter) for quick deletion
- Main loop continues after create/delete operations for better workflow
The kitten automatically searches for fzf in common Homebrew locations:
/opt/homebrew/bin/fzf(Apple Silicon)/usr/local/bin/fzf(Intel)~/.fzf/bin/fzf(manual install)
If fzf is not found, install it:
brew install fzfThe kitten will show the current PATH in the error message if fzf cannot be found, which can help diagnose PATH issues.
Grant terminal access to keychain in System Preferences → Security & Privacy → Privacy → Automation
You may also need to allow kitty to access the keychain. The first time you run the kitten, macOS will prompt you to allow access.
- Ensure you're using the latest version of kitty
- The script detects "password:" prompt on the screen (case-insensitive)
- If the prompt uses different text, the password may not auto-fill
- In that case, use
Ctrl+Eto paste the password manually
- The script uses
UserKnownHostsFile=/dev/nullandStrictHostKeyChecking=nofor convenience - You can modify these settings in the script if you prefer stricter security
- If you need to use SSH keys, you can still use
Ctrl+Eto paste the password for key passphrases
MIT