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.
At a glance
Section titled “At a glance”| 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 |
Choosing a protocol
Section titled “Choosing a protocol”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.
What works on each protocol
Section titled “What works on each protocol”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.
How Mosh and ET connect
Section titled “How Mosh and ET connect”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
- PocketCmd logs in over SSH and runs one command that locates
mosh-serverand readsMOSH_SERVER_NETWORK_TMOUT. - 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. - The app connects to that UDP port with the key. The SSH login was only used to run these commands.
Eternal Terminal
- PocketCmd logs in over SSH and runs
etterminal, passing a client ID and passkey it generated for this session. - It connects to
etserveron 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).
What PocketCmd checks on the server
Section titled “What PocketCmd checks on the server”Test Connection in the server form and the server sheet run one probe over SSH that looks for:
mosh-serveretserver, and whether anetserverprocess is runningtmux- 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.”
Server and launch protocol
Section titled “Server and launch protocol”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.
Switching protocols in a running session
Section titled “Switching protocols in a running session”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.
Installing server software
Section titled “Installing server software”mosh-server
Section titled “mosh-server”# Debian / Ubuntusudo apt install mosh
# Fedorasudo dnf install mosh
# Archsudo pacman -S mosh
# Alpinesudo apk add mosh
# macOS (Homebrew)brew install mosh
# FreeBSDsudo pkg install moshAllow inbound UDP 60000–61000 in the server’s firewall and in any cloud security group.
Eternal Terminal
Section titled “Eternal Terminal”# Ubuntusudo add-apt-repository ppa:jgmath2000/etsudo apt update && sudo apt install et
# Fedorasudo dnf install et
# macOS (Homebrew)brew install MisterTea/et/etOther 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.
Telnet listeners
Section titled “Telnet listeners”Network equipment usually ships with a Telnet service. For a test listener on Linux, BusyBox telnetd or inetutils-telnetd work.
Frequently asked questions
Section titled “Frequently asked questions”Which protocol should I use?
Section titled “Which protocol should I use?”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.
Is Telnet encrypted?
Section titled “Is Telnet encrypted?”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.