How moul/sshportal works
Main Components
a) Core Components:
• SSH Server Interface (Port 2222)
• Built-in Shell/CLI
• Authentication System
• Session Manager
• Access Control Layer (ACL)
• Database Layer (SQLite/MySQL)
b) External Interfaces:
• Client SSH Connections
• Target SSH Hosts
• Telnet Hosts (for non-SSH proxy support)
[Client Layer]
[Frontend Layer]
[Core Services Layer]
[Data Layer]
Component Relationships
a) Client Flow:
• SSH Client → SSH Server Interface
• SSH Server Interface → Authentication System
• Authentication System → ACL Manager
• ACL Manager → Session Manager
• Session Manager → Target Hosts
b) Management Flow:
• Admin CLI → Built-in Shell
• Built-in Shell → Core Services
• Core Services → Database Layer
Specific Implementation Details
a) Package Organization (from /pkg directory):
• Bastion: Core SSH handling
• Crypto: Security operations
• DBModels: Data structures
• Utils: Helper functions
b) Key Features:
• User Management System
• Host Key Management
• Session Recording
• Health Checking
• Audit Logging
Scaling Components
Specific notations for:
• Load balancer (when using MySQL backend)
• Multiple SSHportal instances
• Shared database configuration
• Security boundaries
• Data flow directions
• Scaling points
• Integration interfaces
Use standardized symbols:
• Rectangles for services
• Hexagons for security components
• Clouds for external systems