Getting started

About five minutes. You need an SSH server you can sign in to.

1. Add a host

On the Terminals tab, tap ☰ to open Connections, then tap Remote terminal · Add new SSH host and fill in:

2. Choose how to sign in

Pick one under Authentication. Whatever you choose is saved in the keychain, encrypted with an Android Keystore key, and can be reused by other hosts.

3. Trust the server key on first connect

The first time, Termexa shows the server's key fingerprint. Compare it with the one on the server before tapping Trust:

ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub

After that the key is checked on every connection. If it ever changes, Termexa stops and tells you instead of connecting.

4. Keep your session alive with tmux or Herdr

Phones drop connections. Run a multiplexer on the server and your programs and agents keep running; Termexa reconnects to the same session. Put one of these in Command to run when you add the host, or type it after connecting:

tmux new -A -s main      # attach to "main", or create it
herdr --session main     # the same with Herdr

Add the Navigate key to the shortcut panel (in Settings → Shortcut panel, tap a slot and pick it from the Plugins tab). It shows the sessions, windows and panes and takes you to the one you tap.

With set -g set-clipboard on in ~/.tmux.conf, text you copy in tmux goes to the phone clipboard. Termexa asks the first time for each host; change it later under the host's Server copies to clipboard setting.

5. Make the toolbar yours

6. Files

The folder button at the top of the terminal opens the SFTP file window for the same host: browse, upload, download, rename, change permissions and edit text files. Transfers keep going after you close the window; the Transfers button in the bottom bar shows progress and history for every host. Long-press to select items; the ⋮ button in the selection bar extracts or compresses archives on the server. Tap the star in the path bar to bookmark a folder.

7. Know when a command finishes

With shell integration, Termexa notifies you when a command that ran for 10 seconds or more finishes while you are looking elsewhere (turn on Terminal alerts in Settings). fish 4 and later already supports it. For zsh, add this to the end of ~/.zshrc:

# Termexa shell integration (OSC 133)
_termexa_osc() { if [ -n "$TMUX" ]; then printf '\ePtmux;\e\e]133;%s\a\e\\' "$1"; else printf '\e]133;%s\a' "$1"; fi; }
_termexa_precmd() { local s=$?; _termexa_osc "D;$s"; _termexa_osc A; return $s; }
_termexa_preexec() { _termexa_osc C; }
precmd_functions=(_termexa_precmd $precmd_functions)
preexec_functions+=(_termexa_preexec)

For bash, add this to the end of ~/.bashrc:

# Termexa shell integration (OSC 133)
_termexa_osc() { if [ -n "$TMUX" ]; then printf '\ePtmux;\e\e]133;%s\a\e\\' "$1"; else printf '\e]133;%s\a' "$1"; fi; }
_termexa_prompt() { local s=$?; _termexa_osc "D;$s"; _termexa_osc A; return $s; }
PROMPT_COMMAND="_termexa_prompt${PROMPT_COMMAND:+;$PROMPT_COMMAND}"
PS0='$(_termexa_osc C)'"$PS0"

In tmux, also add set -g allow-passthrough on to ~/.tmux.conf. Alerts then work inside tmux too.

If it does not connect