TUIOS can run as an SSH server, allowing remote connections to your terminal sessions. This enables remote access, shared sessions, and multi-user workflows.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Gaurav-Gosain/tuios/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The SSH server mode provides:- Remote Access: Connect to TUIOS from anywhere over SSH
- Persistent Sessions: Sessions survive disconnects and reconnects
- Multi-Client Support: Multiple users can share or view the same session
- Daemon Integration: Full integration with TUIOS session management
- Secure Authentication: Standard SSH key-based authentication
Quick Start
Start SSH Server
Connect from Client
Configuration
Command-Line Flags
| Flag | Default | Description |
|---|---|---|
--port | 2222 | SSH server port |
--host | localhost | Server bind address |
--key-path | Auto-generated | Path to SSH host key |
--default-session | (none) | Default session name for all connections |
--ephemeral | false | Disable daemon mode (sessions don’t persist) |
Host Key
TUIOS automatically generates an SSH host key if not specified: Default location:~/.ssh/tuios_host_key
To use a custom host key:
Bind Address
Local only (default):Session Management
By default, TUIOS SSH uses daemon mode for persistent sessions.Daemon Mode (Default)
Connections attach to TUIOS daemon sessions:- Sessions persist when SSH connections close
- Multiple clients can view/share the same session
- State (windows, workspaces) preserved across reconnections
- Integrates with
tuios ls,tuios attach, and other session commands
Session Selection Priority
When a client connects, the session is determined by:--default-sessionflag (if specified on server)- SSH username (if not generic like “tuios”, “root”, “anonymous”)
- SSH command argument (e.g.,
ssh host attach mysession) - First available session or create new
Ephemeral Mode
Disable daemon mode for standalone sessions:- Each connection gets a new TUIOS instance
- Sessions terminate when SSH connection closes
- No session persistence or sharing
- Legacy behavior (pre-daemon)
Authentication
TUIOS uses standard SSH authentication mechanisms.Public Key Authentication
Configure SSH keys as you would for any SSH server: On client:~/.ssh/authorized_keys as usual.
Password Authentication
TUIOS uses the system’s SSH authentication. If your system allows password authentication, it will work with TUIOS.Public key authentication is strongly recommended for security.
Multi-Client Sessions
When multiple clients connect to the same session:Terminal Size
The terminal uses the minimum dimensions of all connected clients:- If Client A has 80x24 terminal
- And Client B has 120x40 terminal
- The shared session uses 80x24
State Synchronization
All clients see the same state in real-time:- Window creation/deletion
- Workspace switches
- Terminal output
- Layout changes
Input
All clients can send input to the session. Coordinate usage to avoid conflicts.Examples
Example 1: Personal Remote Access
Access your TUIOS sessions from anywhere: On server:Example 2: Shared Team Session
Multiple team members collaborate in real-time: On server:Example 3: Demo/Presentation Mode
Run demos where audience members can view but not interact: On presenter’s machine:Example 4: Integrate with Web Terminal
Combine SSH server with web terminal for browser access: Terminal 1: Start SSH serverAdvanced Usage
Custom Host Key
Generate and use a custom host key:Running as System Service
Create a systemd service to run TUIOS SSH server automatically:/etc/systemd/system/tuios-ssh.service:
Forwarding TUIOS Flags
Pass TUIOS configuration flags through SSH command:Security Considerations
Network Exposure
Local only (secure):Authentication
Best practices:- Use Ed25519 or RSA 4096-bit keys
- Disable password authentication in SSH config
- Use
authorized_keysto control access - Consider using SSH certificates for large deployments
Firewall Configuration
Allow SSH port:Troubleshooting
Cannot Connect
Check server is running:Host Key Verification Failed
If the host key changed:Permission Denied
Check authorized_keys:Daemon Not Starting
If daemon mode fails, SSH server falls back to ephemeral mode:See Also
- Session Management - Managing TUIOS sessions
- Web Terminal - Browser-based access (tuios-web)
- CLI Reference - Complete SSH command reference