Name

telnet

Synopsis

    telnet [options] [host [port]]

Communicate with another host using the Telnet protocol. host may be either a name or a numeric Internet address (dot format). telnet has a command mode (indicated by the telnet> prompt) and an input mode (usually a login session on the host system). If no host is given, telnet defaults to command mode. You can also enter command mode from input mode by typing the escape character ^]. In command mode, type ? or help to list the available commands.

Tip

In days of yore, telnet used a direct, clear, unencrypted data stream for all information, including login names and passwords. Doing so today is terribly insecure, and you should not use telnet if you cannot use the encryption facility. (See ssh for an alternative.) Nevertheless, telnet remains useful for network debugging; for example, connecting directly to SMTP, POP3, or IMAP servers for testing.

Common Options

-8

Use an eight-bit data path. This negotiates the BINARY option for input and output.

-a

Attempt an automatic login. This is the default on Mac OS X.

-c

Don’t read $HOME/.telnetrc at startup.

-d

Set the debug option to true.

-e c

Use c as the escape character. The default is ^]. A null value disables the escape character mechanism.

-E

Don’t have an escape character.

-f

If using Kerberos, forward the local credentials to the remote system.

-F

Like -f, but includes credentials that were already forwarded to the local system too.

-k realm

For Kerberos, obtain a ticket for the ...

Get Unix in a Nutshell, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.