Communicate with the computer running the telnet server service.
telnet command with examples and options
telnet [/a] [/e <EscapeChar>] [/f <FileName>] [/l <UserName>] [/t {vt100 | vt52 | ansi | vtnt}] [<Host> [<Port>]] [/?]
parameter
parameter | Explanation |
---|---|
/a | Try to log in automatically. It is the same as the /l option except that the name of the currently logged in user is used. |
/e<EscapeChar> | Escape character used to enter telnet client prompt. |
/f <FileName> | The file name used for client logging. |
/l<UserName> | Specify the user name to log in on the remote computer. |
/t {vt100 | vt52 | ansi | vtnt} | Specify the terminal type. Supported terminal types are vt100, vt52, ansi, and vtnt. |
<Host> [<Port>] | Specify the host name or IP address of the remote computer to connect to, and you can also specify the TCP port to use (default is TCP port 23). |
/? | Display help at the command prompt. Alternatively, you can type /h. |
Remarks
- You must install the telnet client software before you can run this command. For details, see Installing telnet .
- You can run telnet without parameters to enter the telnet context, as shown in the telnet prompt ( Microsoft telnet> ). At the telnet prompt, you can use the telnet command to manage the computer running the telnet client.
Examples
Use telnet to connect to the computer running the telnet server service at telnet.microsoft.com.copy
telnet telnet.microsoft.com
Use telnet to connect to the computer running the telnet server service on telnet.microsoft.com on TCP port 44 and record session activity in a local file named telnetlog.txt.copy
telnet /f telnetlog.txt telnet.microsoft.com 44