15.2 Remote access with Telnet
Telnet is a protocol that was very widely used to connect remotely to computers and other devices including routers. Because it is not secure, it should no longer be used over the internet, but it is easy to configure and still used internally within companies and for legacy equipment.
Watch the video below, which is about 3 minutes long. You will see how Telnet can be used to connect to a router, how to protect the router with a password and warning message.
Activity 4 Try it out
Openin a new tab or window so you can read these instructions.
In this activity you will configure the router in the network to accept a Telnet connection from the PC.
Open the router console and enter global configuration mode using the password ‘opennetlab’.
Configure the virtual teletypes (vty) with the password ‘onlvty’.
Set a message of the day.
Now open the PC command line and check that you can ping from the PC (192.168.0.100) to the router (192.168.0.1).
Open a Telnet session by entering the command telnet 192.168.0.1, giving the appropriate password.
Confirm that you are connected to the router by entering global configuration mode and entering the command show running-configuration.
Finish the Telnet session by entering exit.
The router will accept Telnet connections from a PC or other remote device; the router considers these to be ‘virtual teletypes’. For security, a password must be given before a connection is allowed.
To configure the virtual teletypes, enter the command line vty 0 15 (the range depends on the particular model of router). Then enter password onlvty to set the password to ‘onlvty’.
In global configuration mode, set a message of the day with a command such as banner motd !Authorised users only, please!.
This completes the setup for the router. To test the connection, you will need to turn to the command line on the PC. You can first confirm that the PC is connected to the router with a ping.
Then to open a Telnet session, you should enter the command telnet 192.168.0.1, giving the password ‘onlvty’ which you previously set on the router. You will see the message of the day and the prompt will change to ‘Router>’ showing that you are now giving commands to the router.
You can now work with the router’s command line, for example entering global configuration mode (you will need the password ‘opennetlab’) and show the running configuration.
You should exit from the Telnet session using exit.
Confirm that you are back on the PC command line by checking the prompt and using commands such as ipconfig.