ssh-manager-pro
v1.1.2
Published
π Professional SSH key manager with automatic clipboard integration, cross-platform support, and zero-configuration setup
Maintainers
Readme
π SSH Manager
A robust, production-ready SSH key manager with automatic clipboard integration, cross-platform support, and zero-configuration setup.
β¨ Features
- One-Click Key Generation: Generate SSH keys and automatically copy to clipboard
- Instant Key Retrieval: Copy existing SSH keys to clipboard with a single command
- Multiple Key Types: Support for RSA, Ed25519, and ECDSA keys
- Interactive Mode: User-friendly prompts for key generation
- Key Management: List, delete, and manage multiple SSH keys
- Cross-Platform: Works on Windows, macOS, and Linux
- Backup & Restore: Backup your keys and restore them when needed
- Security Features: Proper file permissions and validation
- Configuration Management: Customizable settings and preferences
π Quick Start
NPM Installation (Recommended)
# Install globally
npm install -g ssh-manager-pro
# Or use npx (no installation required)
npx ssh-manager-pro generateDevelopment Installation
# Clone the repository
git clone https://github.com/sabuz/ssh-manager-pro.git
cd ssh-manager
# Install dependencies and setup
npm install
npm run setupBasic Usage
# Generate a new SSH key and copy to clipboard
ssh-manager generate
# Copy existing key to clipboard
ssh-manager copy
# List all SSH keys
ssh-manager list
# Show status and system information
ssh-manager statusπ Commands
Generate (generate, gen)
Generate a new SSH key pair and automatically copy the public key to clipboard.
# Basic generation (interactive mode)
ssh-manager generate
# Quick generation with defaults
ssh-manager gen -t rsa -b 4096 -n my-key
# Interactive mode with prompts
ssh-manager gen --interactive
# Generate with custom options
ssh-manager gen --type ed25519 --name work-laptop --comment "[email protected]"Options:
-t, --type <type>: Key type (rsa, ed25519, ecdsa) [default: rsa]-b, --bits <bits>: Key size in bits [default: 4096]-n, --name <name>: Key name (without extension)-c, --comment <comment>: Key comment-p, --passphrase <passphrase>: Key passphrase-f, --force: Overwrite existing key-i, --interactive: Interactive mode
Copy (copy, cp)
Copy an existing SSH public key to clipboard.
# Interactive key selection
ssh-manager copy
# Copy specific key by name
ssh-manager cp --name id_rsa
# List keys first, then select
ssh-manager cp --listOptions:
-n, --name <name>: Key name to copy-l, --list: List available keys first
List (list, ls)
List all SSH keys in your SSH directory.
# Basic list
ssh-manager list
# Detailed information
ssh-manager ls --detailedOptions:
-d, --detailed: Show detailed information
Delete (delete, del)
Delete SSH key pairs.
# Interactive deletion
ssh-manager delete
# Delete specific key
ssh-manager del --name old-key
# Force deletion without confirmation
ssh-manager del --name old-key --forceOptions:
-n, --name <name>: Key name to delete-f, --force: Skip confirmation
Status (status, st)
Show SSH manager and system status.
ssh-manager statusπ§ Configuration
SSH Manager uses a configuration file located at ~/.ssh-manager/config.json. You can customize various settings:
{
"ssh": {
"defaultKeyType": "rsa",
"defaultKeySize": 4096,
"defaultDirectory": "~/.ssh",
"supportedKeyTypes": ["rsa", "ed25519", "ecdsa"]
},
"clipboard": {
"timeout": 5000,
"fallbackMethods": ["pbcopy", "xclip", "clip"]
},
"security": {
"enablePassphrase": false,
"backupKeys": true,
"maxKeyAge": 365
},
"ui": {
"colors": true,
"animations": true,
"verbose": false
}
}π‘οΈ Security Features
- Proper File Permissions: Automatically sets correct permissions (600 for private keys, 644 for public keys)
- Input Validation: Comprehensive validation of all inputs
- Secure Defaults: Uses secure key types and sizes by default
- Backup Support: Optional automatic backup of keys
- Passphrase Support: Optional passphrase protection for private keys
π Backup & Restore
Create Backup
# Create backup with timestamp
ssh-manager backup create
# Create backup to specific location
ssh-manager backup create --path ~/my-backups
# Create compressed backup
ssh-manager backup create --compressRestore Backup
# Restore from backup
ssh-manager backup restore ~/backups/ssh-backup-2024-01-01.tar.gz
# Dry run (preview what would be restored)
ssh-manager backup restore ~/backups/backup.tar.gz --dry-run
# Restore with overwrite
ssh-manager backup restore ~/backups/backup.tar.gz --overwriteList Backups
ssh-manager backup list ~/backupsπ§ͺ Testing
Run the test suite to ensure everything works correctly:
# Run all tests
npm test
# Run tests in watch mode
npm run test:watch
# Run with coverage
npm test -- --coverageπ Troubleshooting
Common Issues
ssh-keygen not found
- Install OpenSSH on your system
- Ensure ssh-keygen is in your PATH
Clipboard not working
- Install clipboard utilities for your platform:
- Linux:
xcliporxsel - macOS: Built-in
pbcopy - Windows: Built-in
clip
- Linux:
- Install clipboard utilities for your platform:
Permission denied
- Ensure you have write permissions to the SSH directory
- Run with appropriate privileges if needed
Key already exists
- Use
--forceflag to overwrite - Or choose a different key name
- Use
Debug Mode
Enable verbose output for debugging:
ssh-manager generate --verboseπ€ Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Run the test suite
- Submit a pull request
π License
MIT License - see LICENSE file for details.
π Acknowledgments
- Built with Node.js and modern CLI tools
- Uses industry-standard SSH key generation
- Cross-platform clipboard integration
- Comprehensive error handling and validation
Made with β€οΈ for developers who love automation and security
