telnet [options] [host [port ]]

Accesses remote systems. telnet is the user interface that communicates with another host using the Telnet protocol. If telnet is invoked without host, it enters command mode, indicated by its prompt, telnet>, and accepts and executes the commands listed after the following options. If invoked with arguments, telnet performs an open command (shown in the following list) with those arguments. host indicates the host’s official name. port indicates a port number (default is the Telnet port).



Automatic login into the remote system.

-b alias

Used to connect to an alias setup by ifconfig or another interface as the local address to bind to.


Tells telnet not to use a users .telnetrc file.


Turn on socket-level debugging.

-e [ escape_char ]

Set initial telnet escape character to escape_char. If escape_char is omitted, there will be no predefined escape character.


Attempt to get tickets for remote host; query krb_realmofhost to determine realm.

-l user

When connecting to remote system, and if remote system understands ENVIRON, send user to the remote system as the value for variable USER.

-n tracefile

Open tracefile for recording the trace information.


Emulate rlogin. The default escape character is a tilde (~); an escape character followed by a dot causes telnet to disconnect from the remote host; a ^Z instead of a dot suspends telnet; and a ] (the default telnet escape character) generates a normal telnet ...

Get Mac OS X in a Nutshell now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.