Skip to main content

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 address
  • PORT: Server port number (typically 2022)
  • ID: Client ID (from terminal output)
Example:

--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:
Behavior:
  1. Spawns ssh to connect to host
  2. Executes undying-terminal-terminal remotely
  3. Extracts client ID and passkey from output
  4. Switches to direct TCP connection
  5. 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:
Behavior:
  • 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:
Use case: When you want to ignore SSH config settings and use only CLI arguments.

-A, --ssh-agent

Enable SSH agent forwarding (passes local SSH keys to remote session). Example:
Security note: Only enable agent forwarding to trusted hosts.

--no-ssh-agent

Explicitly disable SSH agent forwarding (overrides ForwardAgent in SSH config). Example:

--jumphost <HOST>, --jport <PORT>

Connect through intermediate jump server. Example:
Flow:

Command Execution

-c, --command <COMMAND>

Execute a single command and exit. Format: Command string with newline
Example:
Behavior:
  • 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:
Examples:
Multiple Tunnels:

-r, --reversetunnel <SPEC>

Reverse tunnel (remote → local). Syntax:
Examples:

Environment Variables

--environmentvariable <NAME>=<VALUE>

Send environment variable to remote session. Example:
Multiple Variables:

Usage Examples

Basic Connection

SSH Bootstrap

Port Forwarding

Jumphost

Combined Example

Exit Codes

Environment Variables

These environment variables affect client behavior:

UT_DEBUG_HANDSHAKE

Enable packet-level debugging.
Output: Prints packet types sent/received

UT_PIPE_NAME

Override named pipe path (when connecting to non-default server).

Common Patterns

Connection Script

Save frequently-used connections:
Usage:

Health Check Script

Check if session is responsive:

Automated Deployment

Comparison with Other Terminals

vs. SSH

vs. tmux/screen

vs. Eternal Terminal (ET)

Debugging

Enable verbose output:
Check connection:

Next Steps

Server CLI Reference

Server command-line options

Terminal CLI Reference

Terminal command-line options

Configuration Guide

Configure server behavior

Port Forwarding Guide

Detailed tunnel examples