README
¶
LinkTerm
A powerful WebSocket-based terminal sharing tool that allows you to securely expose and share your terminal (TTY) over any network, even through firewalls and NATs. The server runs on Linux, macOS, Windows (via ConPTY), FreeBSD and other Unix-like systems.
Quick Start
Share your terminal through any network/firewall:
# On the server (machine sharing the terminal):
linkterm server
# On the client (machine accessing the terminal):
linkterm client -t <CONNECTOR_TOKEN>
How it works:
-
The server connects to the relay anonymously. The relay assigns a temporary identity (server token) which the server saves and uses to reconnect with, so the same relay is reused across reconnects.
-
The server then registers a connector token. Without
-t, a random one is generated and printed - use that on the client:INF Connected successfully to LinkSocks server connectorID=3a8b4dfe5e605e01# On the client (machine accessing the terminal): linkterm client -t 3a8b4dfe5e605e01
This method works everywhere - no port forwarding or firewall configuration needed!
For additional security you can use a custom token on both sides:
# Server:
linkterm server -t YOUR_TOKEN
# Client:
linkterm client -t YOUR_TOKEN
You should use a complex token in this case, as anyone holding the token can connect to your terminal:
openssl rand -hex 16
The connection is proxied via our public relay: https://l.zetx.tech. You can also host your own relay on Cloudflare Workers: linksocks/linksocks.js
Direct Connection Mode
For local network or when you have direct access:
Server:
# Host server at 8080
./linkterm server --port 8080 --host localhost
Client:
# Connect to local server
./linkterm client --url ws://localhost:8080
TUI Client (tmux-like)
The client uses a full-screen terminal UI by default (similar to tmux) when
stdout is a terminal: a content area renders the remote terminal, a bottom
status bar shows the host, latency and relay state, and a log panel can be
toggled open. Use --no-tui to force the plain console mode (this also
happens automatically when stdout is not a terminal, e.g. in a pipe).
# default: TUI on a terminal
./linkterm client --url ws://localhost:8080
# plain console mode
./linkterm client --no-tui --url ws://localhost:8080
Layout (top to bottom):
+---------------------------------------------+
| content area: the remote terminal |
| or the fullscreen log panel (F2 toggles) |
+---------------------------------------------+
| ● host | Latency 12ms | F2 Logs F3 Quit |
+---------------------------------------------+
The status bar shows (left to right) a connection dot, the remote host, the
link latency, and the clickable hotkey hints. The dot is green when connected,
amber while reconnecting, and red when disconnected, in which case the host is
followed by the relay state (disconnected / reconnecting) and the latency
is hidden.
Keys:
| Key | Action |
|---|---|
F2 |
toggle the fullscreen log panel (all client logs land here, colour-coded by level) |
F3 / Ctrl+Q |
quit the TUI |
| mouse wheel | rewind the content scrollback; scrolls the log panel when it is open |
PgUp / PgDn (log panel) |
scroll the log panel by one page |
Esc / g (while rewound) |
jump back to the live screen |
Clicking the F2 Logs / F3 Quit text in the status bar works the same as
pressing the keys. All other keys are forwarded to the remote terminal as
usual; logs are routed into the log panel instead of stdout.
If the terminal WebSocket drops, the TUI keeps the last screen, shows the disconnected status and automatically reconnects with exponential backoff, restoring the session when the link recovers.
Note: a connector token is validated by the relay (at least 8 characters and
not a trivial pattern like abc123). If you pass an explicit weak -t to
the server, it exits immediately with an error instead of silently swapping
in a random token, so the client can never end up with a mismatched identity.
Installation
LinkTerm can be installed by:
go install github.com/linksocks/linkterm/cmd/linkterm@latest
You can also download pre-built binaries for your architecture from the releases page.
LinkTerm is also available via Docker:
docker run --rm -it jackzzs/linkterm --help
License
MIT