大网数据广告活动
Windows排障命令

telnet

· 52CE 我爱测

Reference article for the telnet command, which communicates with a computer running the telnet server service.

Communicates with a computer running the telnet server service. Running this command without any parameters, lets you enter the telnet context, as indicated by the telnet prompt (Microsoft telnet>). From the telnet prompt, you can use telnet commands to manage the computer running the telnet client.

Important: You must install the telnet client software before you can run this command. For more information, see Installing telnet.

Syntax

telnet [/a] [/e <escapechar>] [/f <filename>] [/l <username>] [/t {vt100 | vt52 | ansi | vtnt}] [<host> [<port>]] [/?]

Parameters

Parameter Description
/a Attempts automatic logon. Same as /l option, except that it uses the currently logged on user's name.
/e <escapechar> Specifies the escape character used to enter the telnet client prompt.
/f <filename> Specifies the file name used for client side logging.
/l <username> Specifies the user name to log on with on the remote computer.
/t `{vt100 vt52
<host> [<port>] Specifies the hostname or IP address of the remote computer to connect to, and optionally the TCP port to use (default is TCP port 23).
/? Displays help at the command prompt.

Examples

To use telnet to connect to the computer running the telnet Server Service at telnet.microsoft.com, type:

telnet telnet.microsoft.com

To use telnet to connect to the computer running the telnet Server Service at telnet.microsoft.com on TCP port 44 and to log the session activity in a local file called telnetlog.txt, type:

telnet /f telnetlog.txt telnet.microsoft.com 44

Related links

Source: Microsoft Learn / Windows Server documentation by Microsoft and contributors (upstream author metadata: robinharwood). Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Server documentation
适用范围
Windows Server · Source date 6/21/2022
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。