The telnet command enables a user to use the Telnet protocol to log in to another device from the current device.
# Log in to another device through Telnet based on IPv4.
telnet [ vpn-instance vpn-instance-name ] [ -a source-ip-address | -i interface-type interface-number ] host-ip [ port-number ]
# Log in to another device through Telnet based on IPv6.
telnet ipv6 [ -a source-ip-address ] [ vpn6-instance vpn6-instance-name ] host-ipv6 [ -oi interface-type interface-number ] [ port-number ]
(Only S5720-EI, S5720-HI, S5720I-SI, S5720S-SI, S5720-SI, S5720-LI, S5735-S, S5735S-S, S5735-S-I, S5730-HI, S5730S-EI, S5730-SI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S5735-L, S5735S-L, S5735S-L-M, S6720-EI, S6720-HI, S6720S-EI, S6720S-SI, S6720-SI, S6730-H, S6730S-H, S6730-S, and S6730S-S support vpn6-instance vpn6-instance-name.)
Parameter |
Description |
Value |
---|---|---|
vpn-instance vpn-instance-name |
Specifies the VPN4 instance name of the device to log in through Telnet. |
The value must be an existing VPN instance name. |
-a source-ip-address |
Specifies a source IP address through which a server communicates with the device. This improves security. If no source address is specified, a device will use the IP address of the local outbound interface to initiate a Telnet connection. |
- |
-i interface-type interface-number |
Specifies the source interface type and number on the local device. |
- |
vpn6-instance vpn6-instance-name |
Specifies the name of the VPN6 instance to which the login device belongs. |
The value must be an existing VPN instance name. |
host-ip |
Specifies the IPv4 address or host name of the remote device. |
The value is a string of 1 to 255 case-insensitive characters without spaces. NOTE:
The string can contain spaces if it is enclosed with double quotation marks ("). |
host-ipv6 |
Specifies the IPv6 address or host name of the remote device. |
The value is a string of 1 to 255 case-insensitive characters without spaces. NOTE:
The string can contain spaces if it is enclosed with double quotation marks ("). |
-oi interface-type interface-number |
Specifies the outbound interface on the local device. |
If the IPv6 address of the remote host is linked to a local address, the outbound interface must be specified. |
port-number |
Specifies the number of the TCP port that is used by the remote device to provide the Telnet service. |
The value is an integer that ranges from 1 to 65535. The default value is 23. |
Usage Scenario
If multiple devices on a network need to be configured and managed, run the telnet command to log in to these devices from your terminal for remote device configuration, facilitating device management.
You can press Ctrl+K to terminate an active connection between the local and remote devices.
Precautions
Before you run the telnet command to connect to the Telnet server, the Telnet client and server must be able to communicate at Layer 3 and the Telnet service must be enabled on the Telnet server.
Logins through Telnet bring security risks because Telnet does not provide any authentication mechanism and data is transmitted using TCP in plain text. The STelnet mode is recommended for networks that have high security requirements.