The telnet command enables you to log in to another device from the current device through Telnet.
# Log in to another device using IPv4 Telnet.
telnet [ vpn-instance vpn-instance-name ] [ -a source-ip-address | -i interface-type interface-number ] host-name [ port-number ]
# Log in to another device using IPv6 Telnet.
telnet ipv6 [ -a source-ip-address ] [ vpn6-instance vpn6-instance-name ] host-name [ -oi interface-type interface-number ] [ port-number ]
| Parameter | Description | Value |
|---|---|---|
| vpn-instance vpn-instance-name | Specifies the name of the VPN instance to which the device to be logged in using Telnet belongs. | The value is a string of 1 to 31 characters, spaces not supported. |
| -a source-ip-address | Specifies the IPv4 or IPv6 address of the local device. By specifying a source IP address, you can use this address to communicate with the server for passing security checks. If no source address is specified, the system will use the IP address of the outbound interface on the local device to initiate a Telnet connection. |
- |
| -i interface-type interface-number | Configuring a loopback interface as the source interface is recommended. |
- |
| host-name | Specifies the IPv4 or IPv6 address or the host name. | The host name is a string of 1 to 255 case-insensitive characters, spaces not supported. The IPv6 host name is a string of 1 to 46. |
| port-number | Specifies the port number used by the remote device that functions as the Telnet server. | The value is an integer ranging from 1 to 65535. The default value is 23. |
| vpn6-instance vpn6-instance-name | Specifies the name of the VPNv6 instance to which the device to be logged in using Telnet belongs. | The value is a string of 1 to 31 characters, spaces not supported. |
| -oi interface-type interface-number | Configuring an interface on the local device as the outbound interface is recommended. |
- |
Usage Scenario
If one or more devices need to be configured and managed, you do not need to connect each of the devices to a terminal to maintain the devices locally. If you have obtained the IP address of a device, you can log in to the device from a terminal using Telnet to remotely configure the device. This allows you to maintain multiple devices on one terminal, greatly facilitating device management.
Prerequisites
The terminal communicates with the remote device using IP, and the Telnet server is enabled on the remote device.
Procedure
During a Telnet connection, you can press Ctrl+K to terminate the connection.
Configuration Impact
Login using Telnet brings security risks because Telnet does not provide any secure authentication mechanism and data is transmitted using TCP in plain text. Using STelnet is recommended for a network that has high requirements for security.
# Log in to sysname_B at 10.10.0.1 from sysname_A.
<sysname_A> telnet 10.10.0.1
Trying 10.10.0.1 ...
Press CTRL+K to abort
Connected to 10.10.0.1 ...
Warning: Telnet is not a secure protocol, and it is recommended to use Stelnet.
Login authentication
Username:admin
Password:
*************************************************************************
* Copyright (C) 2007-2018 *
* Huawei Technologies Co., Ltd. *
* All rights reserved. *
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
*************************************************************************
Info: The max number of VTY users is 9, and the number
of current VTY users on line is 3.
Info: Latest accessed IP: 172.16.1.44 ACCESS TYPE: Telnet Time: 2014-01-18 09:
20:18 +00:00
<sysname_B>