An open API service indexing awesome lists of open source software.

https://github.com/igda-igda/sshm

SSHM is a CLI SSH connection manager that helps DevOps engineers, system administrators, and developers connect to multiple remote servers simultaneously through organized tmux sessions, featuring professional color support and modern terminal interface design.
https://github.com/igda-igda/sshm

cli devops golang ssh ssh-manager system-administration terminal tmux

Last synced: 5 months ago
JSON representation

SSHM is a CLI SSH connection manager that helps DevOps engineers, system administrators, and developers connect to multiple remote servers simultaneously through organized tmux sessions, featuring professional color support and modern terminal interface design.

Awesome Lists containing this project

README

          

# SSHM - SSH Connection Manager

SSHM - SSH Connection Manager

[![Go](https://github.com/igda-igda/sshm/workflows/Go/badge.svg)](https://github.com/igda-igda/sshm/actions)
[![Go Report Card](https://goreportcard.com/badge/github.com/igda-igda/sshm)](https://goreportcard.com/report/github.com/igda-igda/sshm)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![Go Version](https://img.shields.io/badge/Go-1.21+-00ADD8.svg)](https://golang.org/)

**Enterprise-grade SSH connection manager with integrated tmux sessions and intuitive TUI**

*Eliminate connection chaos. Scale your infrastructure management.*

[Installation](#installation) • [Quick Start](#quick-start) • [Features](#key-capabilities) • [Documentation](#command-reference)

---

## Overview

SSHM is a professional SSH connection manager designed for DevOps teams managing complex infrastructure. It combines organized server management, persistent tmux sessions, and a k9s-inspired terminal interface to eliminate connection overhead and improve operational efficiency.

**Key Benefits:**
- **Visual Management** - TUI interface for browsing and organizing servers
- **Session Persistence** - tmux integration with intelligent session handling
- **Enterprise Security** - Encrypted credential storage with multiple auth methods
- **Team Workflows** - Profile-based organization and configuration sharing

---

## Installation

### Go Install (Recommended)
```bash
go install github.com/igda-igda/sshm@latest
```

### Build from Source
```bash
git clone https://github.com/igda-igda/sshm.git
cd sshm && go build -ldflags="-s -w" -o sshm main.go
sudo mv sshm /usr/local/bin/
```

### Binary Releases
Download pre-built binaries from [GitHub Releases](https://github.com/igda-igda/sshm/releases/latest):

| Platform | Architecture | Download |
|----------|-------------|----------|
| 🐧 Linux | AMD64 | [sshm-linux-amd64](https://github.com/igda-igda/sshm/releases/download/v1.4.0/sshm-linux-amd64) |
| 🐧 Linux | ARM64 | [sshm-linux-arm64](https://github.com/igda-igda/sshm/releases/download/v1.4.0/sshm-linux-arm64) |
| 🍎 macOS | Intel | [sshm-darwin-amd64](https://github.com/igda-igda/sshm/releases/download/v1.4.0/sshm-darwin-amd64) |
| 🍎 macOS | Apple Silicon | [sshm-darwin-arm64](https://github.com/igda-igda/sshm/releases/download/v1.4.0/sshm-darwin-arm64) |
| 🪟 Windows | AMD64 | [sshm-windows-amd64.exe](https://github.com/igda-igda/sshm/releases/download/v1.4.0/sshm-windows-amd64.exe) |

**Installation:**
```bash
# Linux/macOS example
curl -L https://github.com/igda-igda/sshm/releases/download/v1.4.0/sshm-linux-amd64 -o sshm
chmod +x sshm
sudo mv sshm /usr/local/bin/
```

**Requirements:** tmux, SSH client

---

## Quick Start

### 1. Launch TUI
```bash
sshm tui
```

### 2. Add Servers
```bash
# Interactive setup
sshm add production-web

# Direct configuration
sshm add prod-api \
--hostname api.prod.com \
--username deploy \
--auth-type key \
--key-path ~/.ssh/prod_key
```

### 3. Organize with Profiles
```bash
sshm profile create production
sshm profile assign prod-web production
sshm profile assign prod-api production
```

### 4. Connect
```bash
# Single server
sshm connect prod-web

# Group connection (multiple windows)
sshm batch --profile production
```

---

## Key Capabilities

### TUI Interface
- **Visual Navigation** - Arrow keys, search (`/`), quick actions (`a`, `e`, `d`)
- **Multi-Panel Layout** - Servers, profiles, sessions, history
- **Real-time Monitoring** - Connection status and session health
- **Keyboard Shortcuts** - Full control without mouse interaction

### Session Management
- **Intelligent tmux Integration** - Automatic session creation and naming
- **Single Server Mode** - Dedicated sessions per server
- **Group Mode** - One session with multiple windows per profile
- **Persistence** - Sessions survive network interruptions

### Security & Authentication
- **Multiple Methods** - SSH keys, passwords, SSH agent
- **Encrypted Storage** - System keyring integration
- **Connection History** - Track usage patterns and diagnostics
- **Secure Input** - Hidden credential prompts

### Team Collaboration
- **Profile Organization** - Environment-based grouping (dev/staging/prod)
- **Configuration Export** - YAML/JSON sharing between teams
- **Import Support** - SSH config and team configurations
- **Batch Operations** - Simultaneous environment connections

---

## Architecture

### Session Design
```
Single Connection Group Connection
┌─────────────────────┐ ┌─────────────────────────────┐
│ tmux: "prod-web" │ │ tmux: "production" │
│ ┌─────────────────┐ │ │ ┌─────┐ ┌─────┐ ┌─────┐ │
│ │ SSH Session │ │ │ │ web │ │ api │ │ db │ │
│ └─────────────────┘ │ │ └─────┘ └─────┘ └─────┘ │
└─────────────────────┘ └─────────────────────────────┘
```

### Security Model
- **Local Configuration** - `~/.sshm/` with restricted permissions
- **Credential Encryption** - System keyring for sensitive data
- **Zero Password Storage** - Authentication preferences only
- **SSH Key References** - File paths, never private key content

---

## Command Reference

### Core Operations
```bash
sshm tui # Launch TUI interface
sshm add [flags] # Add server
sshm list [--profile ] # List servers
sshm connect # Single connection
sshm batch --profile # Group connection
sshm remove # Remove server
```

### Profile Management
```bash
sshm profile create # Create profile
sshm profile list # List profiles
sshm profile assign # Assign server
sshm profile delete # Delete profile
```

### Session Control
```bash
sshm sessions list # Active sessions
sshm sessions kill # Kill session
sshm history [--days N] # Connection history
```

### Configuration
```bash
sshm import # Import configuration
sshm export [--profile ] # Export configuration
sshm export --format json # Export as JSON
```

---

## Development

### Testing
```bash
go test ./... # Run all tests
go test -cover ./... # With coverage
```

### Building
```bash
# Cross-platform builds
GOOS=linux GOARCH=amd64 go build -o sshm-linux-amd64 main.go
GOOS=darwin GOARCH=arm64 go build -o sshm-darwin-arm64 main.go
GOOS=windows GOARCH=amd64 go build -o sshm-windows.exe main.go
```

---

## Project Status

| Component | Status | Notes |
|-----------|--------|-------|
| **Core SSH Management** | ✅ Complete | tmux integration, authentication |
| **Profile Organization** | ✅ Complete | Batch operations, import/export |
| **TUI Interface** | ✅ Complete | k9s-inspired design |
| **Advanced Security** | 🔄 In Progress | Enhanced encryption, keyring |
| **Cloud Integration** | 📋 Planned | AWS/GCP/Azure discovery |

**Current Version:** v1.4.0 • **Status:** Production Ready

---

## Contributing

1. Fork repository
2. Create feature branch (`feature/new-capability`)
3. Add tests for changes
4. Ensure `go test ./...` passes
5. Submit pull request

**Guidelines:** Follow Go conventions, maintain test coverage, update documentation.

---

## License

MIT License - see [LICENSE](LICENSE) file.

---

**Built for DevOps teams managing complex infrastructure at scale.**