Skip to content

Connection Protocols

This content is for the 1.0.0 version. Switch to the latest version for up-to-date documentation.

PocketCmd connects over SSH, Mosh, Eternal Terminal (ET) and Telnet. Each saved server has one protocol, chosen under Protocol in the server form, and all four render through the same terminal emulator.

SSH Mosh Eternal Terminal Telnet
Transport TCP UDP TCP TCP
Port 22, configurable UDP 60000–61000, plus SSH to start TCP 2022, plus SSH to start 23, configurable
Needed on the server sshd sshd and mosh-server sshd, a running etserver and etterminal Any Telnet listener
Encryption SSH (libssh2 with OpenSSL) AES-128-OCB XSalsa20-Poly1305 None
Survives a network change No, reconnects with a new shell Yes Yes No, reconnects
Resumes after the app restarts No Yes, for up to 7 days Yes, for up to 72 hours No

For an encrypted shell, choose between SSH, Mosh and ET based on the network and on your use of tmux. Telnet is for legacy equipment only.

Stable networkThe default. Nothing to install beyond sshd.
SSH
Changing networks or high latencyUDP session that survives IP changes, with local echo on slow links.
Mosh
Unreliable link where UDP is blockedTCP session that reconnects on its own and keeps full scrollback.
Eternal Terminal
Running tmuxtmux already keeps the shell and its history on the server. Choose by network.
SSHMosh

Mosh and ET servers are also SSH servers. Everything that needs SSH (file access, port forwards, command-based dashboard cards) opens a separate SSH connection to the same host, so it works on all three. Telnet servers have no SSH and support none of it.

SSH Mosh ET Telnet
Files (SFTP) and workspaces Yes Yes, over SSH Yes, over SSH No
Port forwarding Yes Yes, over SSH Yes, over SSH No
Jump hosts Yes SSH login only SSH login only No
SSH agent forwarding Yes No No No
Key authentication Yes Yes, for the SSH login Yes, for the SSH login No
tmux integration Yes Yes Yes No
Local echo No When the round trip exceeds 50 ms No No

Port forwards on a Mosh or ET server are carried by the SSH connection, not by the Mosh or ET session, so they do not roam with it.

With a jump host, PocketCmd logs in through the chain to start mosh-server or etterminal, but the Mosh UDP traffic and the ET connection on port 2022 go straight from the device to the server. Those ports must be reachable from the network you are on. See Multi-Hop SSH.

Mosh and ET servers connect over their own protocol from the first tap. The loading screen stays up (for Mosh it reads “Starting mosh-server…”) until the session is usable; no interactive SSH shell is opened first.

Mosh

  1. PocketCmd logs in over SSH and runs one command that locates mosh-server and reads MOSH_SERVER_NETWORK_TMOUT.
  2. It runs mosh-server new, which replies with a UDP port and a session key. When the server has tmux enabled, the tmux session is started as the mosh-server command.
  3. The app connects to that UDP port with the key. The SSH login was only used to run these commands.

Eternal Terminal

  1. PocketCmd logs in over SSH and runs etterminal, passing a client ID and passkey it generated for this session.
  2. It connects to etserver on TCP port 2022 with those credentials.

If either bootstrap fails, PocketCmd opens a plain SSH shell on the same server instead and shows “Mosh unavailable, using SSH” (or “ET unavailable, using SSH”).

Telnet has no bootstrap. PocketCmd opens a TCP connection to the configured port and negotiates binary mode, suppress-go-ahead, terminal type and window size (NAWS).

Test Connection in the server form and the server sheet run one probe over SSH that looks for:

  • mosh-server
  • etserver, and whether an etserver process is running
  • tmux
  • a Telnet listener on port 23 or 2323

In the server form, Mosh and ET appear under Protocol only after a successful test has found them (“Mosh and ET appear after Test Connection if available on the host.”). The server sheet names anything missing, for example “No Mosh: mosh-server is not installed.” or “No ET: etserver is not running.”

The protocol in the server form is what the server is: Files, session discovery and the protocol check go by it. The server sheet’s New terminal lets you pick another available protocol and tmux setting for one launch. The sheet remembers that pick, and tapping the server’s tile uses it too, but it never changes the protocol saved in the server form. See Home Screen.

Tap the protocol chip in a session’s breadcrumb to open Connection Protocol and move the session between SSH, Mosh and ET. The app confirms with “Switched to Mosh” (or the protocol you chose). Choices the server can’t serve are disabled with the reason, such as “mosh-server not found on this host”.

Switching protocols mid-session requires PocketCmd Pro. On Free the picker opens, and choosing another protocol shows the upgrade sheet. Connecting to a Mosh or ET server directly is free.

Terminal window
# Debian / Ubuntu
sudo apt install mosh
# Fedora
sudo dnf install mosh
# Arch
sudo pacman -S mosh
# Alpine
sudo apk add mosh
# macOS (Homebrew)
brew install mosh
# FreeBSD
sudo pkg install mosh

Allow inbound UDP 60000–61000 in the server’s firewall and in any cloud security group.

Terminal window
# Ubuntu
sudo add-apt-repository ppa:jgmath2000/et
sudo apt update && sudo apt install et
# Fedora
sudo dnf install et
# macOS (Homebrew)
brew install MisterTea/et/et

Other systems are covered in the Eternal Terminal install guide. The package provides both etserver and etterminal. Make sure etserver is running (on Linux, sudo systemctl enable --now et) and that TCP 2022 is reachable.

Network equipment usually ships with a Telnet service. For a test listener on Linux, BusyBox telnetd or inetutils-telnetd work.

Use SSH on stable networks. Use Mosh when the device changes networks or the link has high latency. Use Eternal Terminal for long-running sessions where UDP is blocked. Use Telnet only for equipment that offers nothing else.

No. Telnet sends usernames, passwords and all session data in plain text. Use it only on networks you trust.

Do Mosh and Eternal Terminal need extra server software?

Section titled “Do Mosh and Eternal Terminal need extra server software?”

Yes. Mosh needs mosh-server. Eternal Terminal needs etserver installed and running, plus etterminal. PocketCmd logs in over SSH to start both, so the server also needs sshd.

Can I use SFTP or port forwarding with Mosh or Eternal Terminal?

Section titled “Can I use SFTP or port forwarding with Mosh or Eternal Terminal?”

Yes. A Mosh or ET server is also an SSH server, so Files, workspaces and port forwards use an SSH connection to the same host. Port forwards are carried by that SSH connection and do not roam with the Mosh or ET session. Telnet servers support none of these.