Skip to content

NtWriteCode/ssh-pilot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🚁 SSH Pilot

Ultra-lightweight SSH management with a clean web interface

A single native binary that provides a modern web interface for managing SSH server configurations, client hosts, and key pairs. No Docker, no containers, no complexity - just drop the binary and run.

✨ Why This Exists

Managing SSH configurations traditionally requires editing config files manually, remembering complex syntax, and dealing with multiple tools. SSH Pilot gives you a clean web interface to handle all SSH management tasks in one place.

Need command-line only? β†’ Use traditional SSH tools
Want visual management? β†’ You're in the right place
Want both convenience and power? β†’ SSH Pilot delivers

πŸš€ Quick Start

# Download and run
wget https://github.com/NtWriteCode/ssh-pilot/releases/latest/download/ssh-pilot
chmod +x ssh-pilot

# Start SSH Pilot
./ssh-pilot

# Open browser β†’ http://localhost:8081
# Login: admin / admin (changeable in settings)

That's it. No configuration files required to get started.

⚑ Features

πŸ”§ SSH Server Management

  • Visual Configuration - Configure SSH daemon settings through web interface
  • Security Options - Port, authentication methods, user restrictions
  • Config Generation - Generate and write sshd_config files
  • Service Control - Start, stop, restart SSH daemon
  • Configuration Testing - Test SSH configuration before applying
  • Status Monitoring - Real-time SSH daemon status and health

🌐 SSH Client Host Management

  • Host Database - Store and manage SSH client configurations
  • Config Generation - Generate SSH config entries for easy connection
  • Advanced Options - Port forwarding, proxy commands, custom settings
  • Config Export - Download client configurations as files
  • Connection Details - Organize hosts with aliases and connection info

πŸ”‘ SSH Key Pair Management

  • Key Generation - Generate SSH key pairs (RSA, Ed25519, ECDSA)
  • Key Organization - Store and organize key information
  • QR Code Sharing - Generate QR codes for easy key sharing
  • Multiple Types - Support for various key sizes and comments
  • Secure Storage - Keys stored in standard SSH locations

πŸ“Š Statistics & Monitoring

  • Active Connections - View current SSH connections
  • User Sessions - Monitor connected users and sessions
  • Health Checks - SSH daemon status and health monitoring
  • Real-time Stats - Connection statistics and usage data

πŸ“‹ Requirements

  • Linux, macOS, or Windows system
  • SSH daemon installed (openssh-server)
  • Appropriate permissions for SSH configuration management
  • systemctl for service management (Linux)

No additional dependencies, databases, or services required.

πŸ—οΈ Installation

Download Binary

# Intel/AMD (x64)
wget https://github.com/NtWriteCode/ssh-pilot/releases/latest/download/ssh-pilot-linux-amd64 -O ssh-pilot

# ARM64 (Pi 4, Apple Silicon servers)
wget https://github.com/NtWriteCode/ssh-pilot/releases/latest/download/ssh-pilot-linux-arm64 -O ssh-pilot

# ARM (Pi Zero, older Pi)
wget https://github.com/NtWriteCode/ssh-pilot/releases/latest/download/ssh-pilot-linux-arm -O ssh-pilot

# macOS Intel
wget https://github.com/NtWriteCode/ssh-pilot/releases/latest/download/ssh-pilot-darwin-amd64 -O ssh-pilot

# macOS Apple Silicon
wget https://github.com/NtWriteCode/ssh-pilot/releases/latest/download/ssh-pilot-darwin-arm64 -O ssh-pilot

chmod +x ssh-pilot

Build from Source

git clone https://github.com/NtWriteCode/ssh-pilot.git
cd ssh-pilot
go build -o ssh-pilot .

🎯 Usage

SSH Server Configuration

  1. Access Dashboard β†’ Navigate to Server Configuration

  2. Configure Settings:

    • SSH port and web interface port
    • Authentication methods (password, public key)
    • User restrictions (allow/deny users)
    • Security settings (strict modes, timeouts)
    • Advanced options (forwarding, logging)
  3. Apply Changes:

    • Write Config β†’ Generate sshd_config file
    • Test Config β†’ Validate settings before applying
    • Restart SSH β†’ Apply changes to running service

Managing Client Hosts

  1. Add Host β†’ Click "Add Client Host" from dashboard

  2. Configure Connection:

    • Host alias and hostname/IP address
    • Username and port configuration
    • SSH key file path specification
    • Advanced options (forwarding, compression)
  3. Use Configuration:

    • View Config β†’ See generated SSH configuration
    • Download Config β†’ Save as .ssh/config file

SSH Key Management

  1. Generate Keys β†’ Click "Add Key Pair" from dashboard

  2. Choose Key Type:

    • Ed25519 (recommended) - Modern, secure, fast
    • RSA (compatible) - Widely supported legacy option
    • ECDSA (performance) - Good performance balance
  3. Key Management:

    • Generated keys stored in ~/.ssh/ directory
    • QR Code feature for easy mobile sharing
    • Key information organized and searchable

βš™οΈ Configuration

  • Config file: ssh-pilot.json (auto-created)
  • SSH configs: Generated in standard SSH locations
  • Web port: 8081 (use PORT=8082 to change)
  • Session timeout: 60 minutes (configurable in web interface)

Required Tools

SSH Pilot checks for these tools at startup:

  • ssh - SSH client
  • sshd - SSH daemon
  • ssh-keygen - Key generation
  • systemctl - Service management

πŸ”’ Security

For local network use. This tool manages SSH configurations and should be treated securely.

  • βœ… Bcrypt password hashing
  • βœ… Session-based authentication
  • βœ… Rate limiting (5 attempts = 15min block)
  • βœ… Secure cookie flags
  • βœ… Input validation and XSS protection
  • βœ… Configuration backups before changes

Security Best Practices

  • Change default password immediately after first login
  • Use on trusted networks only (localhost/LAN)
  • Run with appropriate permissions (not root unless necessary)
  • Review configurations before applying to production
  • Monitor SSH logs for suspicious activity
  • Keep SSH keys secure and rotate them regularly

πŸ› οΈ Troubleshooting

Missing SSH Binaries:

# Ubuntu/Debian
sudo apt install openssh-server openssh-client

# CentOS/RHEL
sudo yum install openssh-server openssh-clients

Permission Denied Errors:

# Run with appropriate permissions for SSH config management
sudo ./ssh-pilot

# Or ensure user has write access to SSH directories

Configuration Test Failed:

  • Check SSH configuration syntax in generated files
  • Verify file paths and permissions are correct
  • Review SSH daemon logs: journalctl -u ssh

Web Interface Not Accessible:

# Check if port is available
netstat -tlnp | grep 8081

# Try different port
PORT=8082 ./ssh-pilot

# Check firewall settings
sudo ufw status

Logs and Debugging

# Run with verbose output
./ssh-pilot 2>&1 | tee ssh-pilot.log

# Check SSH daemon logs
sudo journalctl -u ssh -f

# Monitor SSH connections
sudo journalctl -u ssh | grep "Accepted\|Failed"

πŸ—οΈ Architecture

ssh-pilot           (native binary)
β”œβ”€β”€ Web Interface   (HTML + vanilla JS)
β”œβ”€β”€ Session Auth    (secure cookies)
β”œβ”€β”€ SSH Management  (sshd integration)
β”œβ”€β”€ Config Generator (sshd_config + ssh_config)
β”œβ”€β”€ Key Management  (ssh-keygen integration)
└── Service Control (systemctl integration)

Files:

  • main.go - Application entry point and setup
  • config.go - Configuration management and persistence
  • ssh.go - SSH daemon operations and key management
  • handlers.go - HTTP request handlers for web interface
  • templates.go - HTML templates for web interface
  • qr.go - QR code generation for key sharing

πŸ“Š API

SSH Pilot provides a simple JSON API when running in web mode:

  • GET /api - Get current configuration (sanitized)
  • GET /api/stats - Get SSH statistics and connection info
  • POST /ssh-control - Control SSH daemon (start/stop/restart)

πŸš€ Roadmap

  • Multi-server management
  • SSH certificate support
  • Configuration templates
  • Bulk operations
  • Integration with cloud providers
  • Advanced monitoring dashboards

🀝 Contributing

This project prioritizes simplicity and reliability. PRs welcome for:

  • Bug fixes and security improvements
  • UI/UX enhancements
  • Performance optimizations
  • Documentation improvements

Please avoid adding:

  • Heavy dependencies or complex frameworks
  • Enterprise features that complicate core use cases
  • Features that break the "single binary" principle

πŸ“ License

MIT License - use it however you want.


⭐ Star this repo if you find it useful!

Built with ❀️ for people who want simple, reliable SSH management without the complexity.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •