• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Telnet \windows\system32\telnet.exe

Create an interactive, text-based terminal session on a remote computer.

To Open

Command Prompt telnet


telnet [-a] [-e esc] [-f file] [-l user] [-t term] [host]


Telnet is used to connect to a remote computer. A Telnet session works very much like a command prompt window, except that commands entered are executed on the remote machine. What you do in Telnet depends on the platform of the remote machine; for example, if connecting to a Unix host, you’ll get a standard terminal window. If you connect to a Windows host, you’ll get a DOS command-prompt window.

The following options can be used with Telnet:


The name or IP address of the remote computer. If you omit host, Telnet will start with a standard Microsoft Telnet> prompt, at which point you can type any of the commands listed below (such as open).


Specifies a port number to use for the connection; if omitted, the default Telnet port (23) is used.

-l user

Specifies the username with which to log in on the remote system. If omitted, you’ll be prompted to enter a username at the remote system’s login. The -l option only works if the remote system provides support for the Telnet ENVIRON option.


Attempts an automatic logon using the username and password of the currently logged-on user.

-e esc_character

Defines the escape character for the Telnet session; by default, escape is set to Ctrl-]. Type the escape character during a Telnet session to temporarily jump to the internal Telnet command prompt (see below).

-f filename

Specifies a file in which to store a log of the session.

-t term

Specifies the terminal type; can be vt100, vt52, vtnt, or ansi (the default).

If a connection has been established, commands typed at the prompt will be interpreted by the remote host. However, if a connection has not yet been established, or if you press the escape character (by default, Ctrl-]), you can use one of the following internal Telnet commands:


Closes the current connection.


Displays settings for the current session, such as the terminal type and escape character. Use set, below, to change an option for the current session; use a command-line parameter, above, to change an option for the next session.

open host

Connect to a remote computer, where host is the same as the command-line option of the same name, described above.


Closes the current connection (if applicable) and exits Telnet.

set variable [ value ]

Sets variable to value. In the case of ntlm, local_echo, and crlf, use set to turn them on or unset (below) to turn them off. In the case of term, type set value, where value can be vt100, vt52, vtnt, or ansi.


Displays the status of the current connection.


Turns off an option previously turned on with set, above.


  • The local_echo variable causes everything you type to be displayed in the Telnet window; some remote hosts require this; others don’t. If you can’t see what you type, turn local_echo on; if you see two of each character, turn it off.

  • Setting the terminal type to vt-100 or ansi will serve your purposes in most cases, unless the remote host instructs you differently when you log in. If you need to emulate a terminal type that Telnet doesn’t support, you’ll need to get a different Telnet client.

  • Since Telnet is a command-line application, you can change settings such as the color and buffer size by clicking on the control box and selecting Properties. Note that a large buffer will allow you to scroll up and see several pages of past commands. For more information on the command prompt window, see Appendix C.

  • Another way to launch Telnet is through a URL, like this: telnet:// server:port. If typed into the Address Bar of a web browser, or if a telnet:// link in a web page is clicked, it will start a common sessions using the default Telnet client.

  • To accept incoming Telnet sessions, open Services (services.msc), right-click Telnet in the list and select Start. To configure the Telnet service to start automatically with Windows, right-click on it and choose Automatic from the Startup type list.

  • Telnet, as a protocol, is slowly being phased out, primarily because there is no encryption. If you log onto a remote server, for example, your password as typed into the window is transmitted in plain text, which means that it could be observed by a third-party monitoring tool. For better security, use SSH instead of Telnet (on both the client and server sides). Good SSH clients for Windows XP include SSH Secure Shell (http://www.ssh.com/) and PuTTY (http://putty.bhni.net/).

See Also

“Telnet Administrator”

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint