与运行 telnet 服务器服务的计算机通信。 在不带任何参数的情况下运行此命令即可进入 telnet 上下文,如 telnet 提示符 (Microsoft telnet>) 所示。 在 telnet 提示符下,可以使用 telnet 命令来管理运行 telnet 客户端的计算机。
Important
必须先安装 telnet 客户端软件,然后才能运行此命令。 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 | 尝试自动登录。 Same as /l option, except that it uses the currently logged on user's name. |
/e <escapechar> |
指定用于进入 telnet 客户端提示符的转义字符。 |
/f <filename> |
指定用于客户端日志记录的文件名。 |
/升 <username> |
指定要在远程计算机上登录的用户名。 |
/吨 {vt100 | vt52 | ansi | vtnt} |
指定终端类型。 Supported terminal types are vt100, vt52, ansi, and vtnt. |
<host> [<port>] |
指定要连接到的远程计算机的主机名或 IP 地址,可以选择要使用的 TCP 端口(默认为 TCP 端口 23)。 |
/? | 在命令提示符下显示帮助。 |
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