Synopsis
Description
The Undying Terminal client is the user-facing component that connects to persistent terminal sessions. It handles interactive I/O, automatic reconnection, port forwarding, and SSH bootstrap.Connection Modes
Direct Connection
Connect to an existing terminal session:SSH Bootstrap
Start a remote terminal via SSH, then connect directly:Options Reference
Connection Options
--connect <HOST> <PORT> <ID>
Connect to existing terminal session.
Arguments:
HOST: Server hostname or IP addressPORT: Server port number (typically 2022)ID: Client ID (from terminal output)
--key <PASSKEY>
Authentication passkey for the session.
Required: Yes (with --connect)Format: Hexadecimal string
Example:
--ssh <HOST>
Bootstrap mode: SSH to host, start remote terminal, connect.
Example:
- Spawns
sshto connect to host - Executes
undying-terminal-terminalremotely - Extracts client ID and passkey from output
- Switches to direct TCP connection
- Maintains persistent session
-l, --login <USERNAME>
SSH login username (used with --ssh).
Example:
SSH Config Options
--ssh-config <PATH>
Specify a custom SSH config file path instead of the default (~/.ssh/config).
Example:
- Loads SSH config directives for the specified host
- Supports:
HostName,User,Port,IdentityFile,ProxyJump,LocalForward,ForwardAgent
--no-ssh-config
Disable SSH config file parsing entirely.
Example:
-A, --ssh-agent
Enable SSH agent forwarding (passes local SSH keys to remote session).
Example:
--no-ssh-agent
Explicitly disable SSH agent forwarding (overrides ForwardAgent in SSH config).
Example:
--jumphost <HOST>, --jport <PORT>
Connect through intermediate jump server.
Example:
Command Execution
-c, --command <COMMAND>
Execute a single command and exit.
Format: Command string with newlineExample:
- Sends command to session
- Waits for output
- Exits on idle timeout
- Does NOT enter interactive mode
--noexit
Keep client running after command completes (interactive mode).
Use with: --connect (default for SSH mode)Example:
Port Forwarding
-t, --tunnel <SPEC>
Forward tunnel (local → remote).
Syntax:
-r, --reversetunnel <SPEC>
Reverse tunnel (remote → local).
Syntax:
Environment Variables
--environmentvariable <NAME>=<VALUE>
Send environment variable to remote session.
Example:
Usage Examples
Basic Connection
SSH Bootstrap
Port Forwarding
Jumphost
Combined Example
Exit Codes
| Code | Meaning |
|---|---|
0 | Success (normal exit) |
1 | Connection failed |
2 | Invalid arguments |
3 | Authentication failed |
4 | Network error |
5 | Protocol error |
Environment Variables
These environment variables affect client behavior:UT_DEBUG_HANDSHAKE
Enable packet-level debugging.
UT_PIPE_NAME
Override named pipe path (when connecting to non-default server).
Common Patterns
Connection Script
Save frequently-used connections:Health Check Script
Check if session is responsive:Automated Deployment
Comparison with Other Terminals
vs. SSH
| Feature | Undying Terminal | SSH |
|---|---|---|
| Session Persistence | Yes Automatic | No Drops on disconnect |
| Recovery | Yes Packet-level | No None |
| Reconnection | Yes Automatic | No Manual |
| Port Forwarding | Yes Persistent tunnels | Yes Drops on disconnect |
| Windows Native | Yes Yes | Warning: Requires WSL/OpenSSH |
vs. tmux/screen
| Feature | Undying Terminal | tmux/screen |
|---|---|---|
| Session Multiplexing | No Single session per terminal | Yes Multiple panes |
| Network Resilience | Yes Built-in recovery | Yes Via SSH wrapper |
| Windows Support | Yes Native | No Requires WSL |
| Port Forwarding | Yes Built-in | No Requires SSH |
vs. Eternal Terminal (ET)
| Feature | Undying Terminal | ET |
|---|---|---|
| Protocol | ET-compatible | ET protocol |
| Platform | Windows | Linux/macOS |
| Architecture | Client-Server-Terminal | Client-Server |
| ConPTY | Yes Yes | No No |