A cross-platform command-line tool for managing and connecting to multiple SSH servers with one-click access. Store your SSH credentials securely and connect to your servers instantly - similar to Remmina but for the terminal.
- π One-click SSH connections - Connect to servers by name or number
- π Secure password storage - Uses system keychains (macOS Keychain, GNOME Keyring) or AES-256 encryption
- π SSH key support - Works with both password and key-based authentication
- π Cross-platform - Works on macOS, Linux, and Windows (WSL/Git Bash)
- π Easy management - Add, edit, list, and delete connections with simple commands
- πΎ Auto-detection - Automatically detects your OS and uses the best security method
macOS / Linux:
curl -fsSL https://raw.githubusercontent.com/Niyiojeyinka/ssh-connection-manager/main/install.sh | bashOr manual installation:
curl -o ~/.local/bin/sshm https://raw.githubusercontent.com/Niyiojeyinka/ssh-connection-manager/main/sshm.sh
chmod +x ~/.local/bin/sshm# Add your first connection
sshm add
# List all connections
sshm list
# Connect by number
sshm 1
# Connect by name
sshm production
# Update a password
sshm update-password
# Remove a connection
sshm deletebash4.0 or highersshpass(for password authentication)openssl(recommended for encryption)
macOS:
brew install hudochenkov/sshpass/sshpassUbuntu/Debian:
sudo apt-get install sshpass openssl libsecret-toolsCentOS/RHEL/Fedora:
sudo dnf install sshpass openssl # Fedora
sudo yum install sshpass openssl # CentOS/RHELWindows (WSL):
sudo apt-get install sshpass openssl# Download and run the installer
curl -fsSL https://raw.githubusercontent.com/Niyiojeyinka/ssh-connection-manager/main/install.sh | bashThis will:
- Download the script to
~/.local/bin/sshm - Make it executable
- Add to your PATH if needed
- Check for dependencies
- Download the script:
curl -o sshm.sh https://raw.githubusercontent.com/Niyiojeyinka/ssh-connection-manager/main/sshm.sh
chmod +x sshm.sh- Move to a directory in your PATH:
# Option A: System-wide (requires sudo)
sudo mv sshm.sh /usr/local/bin/sshm
# Option B: User-only
mkdir -p ~/.local/bin
mv sshm.sh ~/.local/bin/sshm- Add to PATH (if using ~/.local/bin):
Add this to your ~/.bashrc, ~/.zshrc, or ~/.bash_profile:
export PATH="$HOME/.local/bin:$PATH"Then reload:
source ~/.bashrc # or ~/.zshrcgit clone https://github.com/Niyiojeyinka/ssh-connection-manager.git
cd ssh-connection-manager
chmod +x sshm.sh
# Create symlink
sudo ln -s "$(pwd)/sshm.sh" /usr/local/bin/sshm$ sshm add
Connection name: my-server
Username: root
Hostname/IP: 192.168.1.100
Port [22]: 22
Authentication method:
1) SSH Key
2) Password
Select (1 or 2): 2
Password: ********
Confirm password: ********
Password stored securely β
Description: Production Server
Connection 'my-server' added successfully!$ sshm list
=== Available SSH Connections ===
Platform: macos
1) my-server root@192.168.1.100:22 [pwd] - Production Server
2) staging ubuntu@192.168.1.101:22 [key] - Staging Server
3) backup admin@192.168.1.102:2222 [pwd] - Backup Server# By number
$ sshm 1
Connecting to: my-server (root@192.168.1.100:22)
# Logs you in automatically!
# By name
$ sshm my-server
# Interactive selection
$ sshm connect# Edit configuration file
sshm edit
# Update a password
sshm update-password
# Delete a connection
sshm delete
# View help
sshm helpPassword storage varies by platform for maximum security:
| Platform | Storage Method | Security Level |
|---|---|---|
| macOS | Keychain | System-level encryption |
| Linux (GNOME) | GNOME Keyring | System-level encryption |
| Linux (other) | Encrypted file | AES-256-CBC with PBKDF2 |
| Windows (WSL) | Encrypted file | AES-256-CBC with PBKDF2 |
- Use SSH keys when possible - More secure than passwords
- Strong passwords - Use unique, complex passwords for each server
- File permissions - Config files are automatically set to 600 (user-only)
- Regular updates - Keep your system and SSH client updated
Configuration is stored in ~/.ssh/ssh_connections.conf:
# Format: NAME|USER|HOST|PORT|AUTH_TYPE|KEY_FILE|DESCRIPTION
production|root|192.168.1.100|22|password||Production Server
staging|ubuntu|192.168.1.101|22|key|~/.ssh/id_rsa|Staging Server
You can manually edit this file with:
sshm edit# Complete cleanup
sshm uninstall
# Then remove the script
sudo rm /usr/local/bin/sshm
# or
rm ~/.local/bin/sshmThis will remove:
- Configuration file
- All stored passwords
- Encrypted password files
- Backup files
# macOS
brew install hudochenkov/sshpass/sshpass
# Linux
sudo apt-get install sshpass# Re-add the password
sshm update-password# Fix config file permissions
chmod 600 ~/.ssh/ssh_connections.conf
chmod 600 ~/.ssh/ssh_passwords.enc # if exists# Make sure it's in your PATH
which sshm
# If not found, add to PATH
export PATH="$HOME/.local/bin:$PATH"Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by Remmina remote desktop client
- Built with claude
If you encounter any issues or have questions:
- Check the Troubleshooting section
- Search existing Issues
- Open a new issue with:
- Your OS and version
- Steps to reproduce
- Error messages
- GUI wrapper (optional)
- Import from Remmina configuration
- Connection groups/categories
- Batch operations
- Connection health checks
- Session logging
- Port forwarding support
- SFTP integration
Made with β€οΈ with claude