trzsz Command Reference

The trzsz command is the local wrapper. It is executed on your local computer and encapsulates another interactive terminal program (most commonly ssh).

Its sole purpose is to monitor the standard input and output (stdio) streams of the wrapped program. It passes all regular keystrokes and shell output through transparently, but intercepts trzsz protocol escape sequences to trigger the UI (file dialogs, progress bars) and handle the file system I/O locally.

Syntax

trzsz [options] command_line
  • command_line: The command you want to wrap. It can be an SSH connection, a local shell, or any terminal application. Example: ssh [email protected].

Command-Line Options

Flag Long Flag Description When to Use
-h --help Show the help message and exit. -
-v --version Show the version number and exit. -
-r --relay Run as a trzsz relay server. Use this on a jump server/bastion host when you need to SSH into a final target server through a tmux session on the jump server.
-t --tracelog Enable trace log generation. Use when debugging failed transfers. It logs all raw data passed between the client and server to /tmp/trzsz_*.log.
-d --dragfile Enable drag-and-drop file uploads. Use this always! It allows you to drag a file from your OS into the terminal to instantly initiate a trz upload.
-z --zmodem Enable Zmodem (rz/sz) integration. Use if you frequently connect to legacy systems that lack Go environments and only have lrzsz installed. (Requires lrzsz installed locally).
-o --osc52 Enable clipboard integration. Use if you want the remote server to be able to securely copy text directly to your local OS clipboard.

Common Use Cases & Examples

1. The Standard Workflow Wrap a standard SSH session. All trz and tsz commands executed on 192.168.1.100 will now function perfectly.

trzsz ssh [email protected]

2. The Power User Workflow Enable drag-and-drop uploads and OSC52 clipboard syncing.

trzsz -d -o ssh [email protected]
(Recommended: Alias this in your ~/.bashrc as alias ssh="trzsz -d -o ssh")

3. Local Testing You can test trzsz without a remote server by wrapping a local shell.

trzsz bash
# Now, typing 'trz' or 'tsz' will transfer files to/from your own local machine.

4. The Jump Server Relay If you must SSH into Server A (Jump), run tmux, and then SSH into Server B (Target):

On your local machine:

trzsz ssh user@serverA
Inside Server A's tmux session:
trzsz --relay ssh user@serverB
Now, running tsz on Server B will successfully tunnel back to your local machine.