Telnet is an application protocol that allows a user to communicate with a remote device. A user on a client machine can use a software (a Telnet client) to access a command-line interface of another, remote machine running a Telnet server program.
The Cisco IOS offers both a Telnet client and a Telnet server. You can use the built-in telnet client to access a remote device. This can be done by invoking the telnet IP_ADDRESS command:
In the picture above you can see that we’ve used the telnet command on R2 to telnet into R1 (notice that the prompt has changed from R2# to R1>). All issued commands will be executed on R1.
To suspend a Telnet session and return to the CLI of your device, press Ctrl+Shift+6 and then X. To return to the Telnet session you’ve suspended, press Enter twice. To close a telnet session, type the exit command.
The telnet server is disabled by default on IOS devices. To enable it, enter the following commands:
- DEVICE(config) line vty FIRST_VTY LAST_VTY – IOS devices typically have 16 VTY lines. This means that 16 concurrent Telnet or SSH sessions can be established. The nubmering starts from 0, so this line usually looks like this: line vty 0 15
- DEVICE(config-line) password PASSWORD – sets the password for the telnet access.
- DEVICE(config-line) login – allows a remote access to a device.