You can’t actually Telnet into a router unless somebody adds a password to the Telnet or vty lines. Again, you can add a password to the vty lines or tell the router to look for a local username and password (in the configuration file or username and password stored on a RADIUS/TACACS server), as shown below:
Router(config-line)#line vty 0 15
Router(config-line)#password cisco
Router(config-line)#login ← or login local
The output below is a Telnet session from one router to another. You can see the hostname change when you get Telnet access. The password will not show as you type it:
Router1#telnet 192.168.1.2
Trying 192.168.1.2 …Open
User Access Verification
Username: paul
Password:
Router2>
If you have a security IOS image, you can configure the router to permit only SSH access rather than Telnet. The benefit of this is that all data is encrypted. If you try to Telnet after SSH has been enabled, the connection will be terminated:
Router1(config)#line vty 0 15
Router1(config-line)#transport input ssh
Router2#telnet 192.168.1.2
Trying 192.168.1.2 …Open
[Connection to 192.168.1.2 closed by foreign host]