Skip to content

Latest commit

Β 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SSH Connection Manager

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.

Platform License

✨ Features

  • πŸš€ 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

🎬 Quick Start

One-Line Install

macOS / Linux:

curl -fsSL https://raw.githubusercontent.com/Niyiojeyinka/ssh-connection-manager/main/install.sh | bash

Or manual installation:

curl -o ~/.local/bin/sshm https://raw.githubusercontent.com/Niyiojeyinka/ssh-connection-manager/main/sshm.sh
chmod +x ~/.local/bin/sshm

Usage

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

πŸ“‹ Requirements

All Platforms

  • bash 4.0 or higher
  • sshpass (for password authentication)
  • openssl (recommended for encryption)

Installation Commands

macOS:

brew install hudochenkov/sshpass/sshpass

Ubuntu/Debian:

sudo apt-get install sshpass openssl libsecret-tools

CentOS/RHEL/Fedora:

sudo dnf install sshpass openssl  # Fedora
sudo yum install sshpass openssl  # CentOS/RHEL

Windows (WSL):

sudo apt-get install sshpass openssl

πŸ”§ Installation

Method 1: Quick Install (Recommended)

# Download and run the installer
curl -fsSL https://raw.githubusercontent.com/Niyiojeyinka/ssh-connection-manager/main/install.sh | bash

This will:

  • Download the script to ~/.local/bin/sshm
  • Make it executable
  • Add to your PATH if needed
  • Check for dependencies

Method 2: Manual Install

  1. Download the script:
curl -o sshm.sh https://raw.githubusercontent.com/Niyiojeyinka/ssh-connection-manager/main/sshm.sh
chmod +x sshm.sh
  1. 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
  1. 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 ~/.zshrc

Method 3: Clone Repository

git 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

πŸ“– Usage Guide

Adding a Connection

$ 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!

Listing Connections

$ 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

Connecting to a 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

Managing Connections

# Edit configuration file
sshm edit

# Update a password
sshm update-password

# Delete a connection
sshm delete

# View help
sshm help

πŸ”’ Security

Password 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

Security Best Practices

  1. Use SSH keys when possible - More secure than passwords
  2. Strong passwords - Use unique, complex passwords for each server
  3. File permissions - Config files are automatically set to 600 (user-only)
  4. Regular updates - Keep your system and SSH client updated

πŸ—‚οΈ Configuration

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

πŸ—‘οΈ Uninstallation

# Complete cleanup
sshm uninstall

# Then remove the script
sudo rm /usr/local/bin/sshm
# or
rm ~/.local/bin/sshm

This will remove:

  • Configuration file
  • All stored passwords
  • Encrypted password files
  • Backup files

πŸ› Troubleshooting

sshpass not found

# macOS
brew install hudochenkov/sshpass/sshpass

# Linux
sudo apt-get install sshpass

Connection fails with "Password not found"

# Re-add the password
sshm update-password

Permission denied errors

# Fix config file permissions
chmod 600 ~/.ssh/ssh_connections.conf
chmod 600 ~/.ssh/ssh_passwords.enc  # if exists

Can't find sshm command

# Make sure it's in your PATH
which sshm

# If not found, add to PATH
export PATH="$HOME/.local/bin:$PATH"

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Inspired by Remmina remote desktop client
  • Built with claude

πŸ“ž Support

If you encounter any issues or have questions:

  1. Check the Troubleshooting section
  2. Search existing Issues
  3. Open a new issue with:
    • Your OS and version
    • Steps to reproduce
    • Error messages

πŸ—ΊοΈ Roadmap

  • 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

About

Easy SSH Manager

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages