Telnet
This content is for the 1.0.0 version. Switch to the latest version for up-to-date documentation.
PocketCmd includes a Telnet client for equipment that offers nothing else: network switches and routers, serial console servers, embedded devices running BusyBox telnetd, and Telnet services such as BBSes.
Set up a Telnet server
Section titled “Set up a Telnet server”- Create a server and select Telnet under Protocol. The port changes from 22 to 23; edit it if the device listens elsewhere.
- Enter the Hostname and, if you want PocketCmd to log in for you, the Username.
- Under Authentication, choose Password and enter it or None to log in by hand. Key authentication is not available for Telnet.
- Optionally turn on Auto-send credentials on prompt (see below).
- Tap Test Connection to check that the device answers, then save.
The form shows a warning while Telnet is selected: “Credentials and session data are sent in plaintext. Use only on trusted networks.”
The first time you connect, PocketCmd asks you to confirm with This connection is unencrypted. Tap Connect to continue. The dialog appears on every connection until you check Don’t show again for this task.
Auto-login
Section titled “Auto-login”With Auto-send credentials on prompt on, PocketCmd answers the device’s login prompts with the saved username and password:
- When the last line of output ends in
login:orUsername:, it sends the username. - After that, when the last line is a password prompt such as
Password:, it sends the password once.
The password is sent only after the username prompt was answered, and auto-login stops after the password is sent or after 10 seconds. A device that asks for a password without first asking for a username is not answered; log in by hand there.
The saved password crosses the network in plain text like everything else in the session.
Terminal size and type
Section titled “Terminal size and type”PocketCmd reports the terminal type through Telnet’s TTYPE option, using the server’s Terminal type (TERM) setting (under Advanced) or the app-wide default. Once the device accepts the window-size option (NAWS), PocketCmd sends the new size every time the terminal resizes: on rotation, when the keyboard opens or closes, and when you drag a split-screen divider.
Limitations
Section titled “Limitations”Telnet servers have no SSH connection, so the following are not available for them:
- Files (SFTP), workspaces and command-based dashboard cards
- Port forwarding
- Jump hosts. PocketCmd connects directly to the host and port.
- Key authentication and agent forwarding
- The tmux integration. If the device runs tmux, start it yourself after logging in.
A Telnet session does not survive an app restart. If the connection drops, PocketCmd reconnects to a new login prompt.
Troubleshooting
Section titled “Troubleshooting”The connection closes right away
Section titled “The connection closes right away”The device refused the connection or closed it during option negotiation. Make sure the port really runs Telnet and not SSH or a raw TCP service: nc <host> <port> from a computer should show a login banner.
Auto-login does not fire
Section titled “Auto-login does not fire”The device’s prompt doesn’t match what auto-login recognizes, or it asks for a password without asking for a username first. Turn auto-login off and log in by hand.
Output wraps at the wrong width
Section titled “Output wraps at the wrong width”The device has not accepted window-size negotiation. Rotate the device or open and close the keyboard to resend the size. If the device does not support NAWS at all, set the size on the device itself, for example with stty rows 40 cols 120.