Basic configuration of telnet and ssh
Telnet: Main TCP services such as telnet: R1 configuration: Router> enableRouter # configure terminal Router (config) # line console 0 // configure the line console port Router (config-line) # exec-timeout 0 0 // set timeout to never time out Router (config-line) # logging synchronous // enable log synchronization information Router (config-line) # exit Router (config) # no ip do lo // disable domain name resolution Router (config) # ho Router0 // set the vro name Router0 (config) # interface f0/0Router0 (config-if) # ip address 12.1.1.1 route 255.255.0router0 (config-if) # no shutdown Router0 (config-if) # exit // configure ip address R2 under the interface: Router (config) # line console 0 Router (config-line) # exec-timeout 0 0 Router (config-line) # logging synchronous Router (config-line) # exit Router (config) # no ip do lo Router (config) # ho Router2 Router2 (config) # interface f0/0Router2 (config-if) # ip address 12.1.1.2 255.255.255.0Router2 (config-if) # no shutdown Router2 (config-if) # exit Router2 (config) # username 123 password 123 // set the user name and password Router2 (config) # line vty 0 4 // interface for setting the login line Router2 (config-line) # password 123 // set the line password Router2 (config-line) # exit Router2 (config) # enable password 123 // enter the privileged user's password Router2 (config) # end Router0 # telnet 12.1.1.2 // telnet to login Trying 12.1.1.2... open User Access Verification Password: SSH: R1 configuration: Router> enableRouter # configure terminal Router (config) # line console 0 // configure the line console port Router (config-line) # exec-timeout 0 0 // set timeout to never time out Router (config-line) # logging synchronous // enable log synchronization information Router (config-line) # exit Router (config) # no ip do lo // disable domain name resolution Router (config) # ho Router0 // set the vro name Router0 (config) # interface f0/0Router0 (config-if) # ip address 12.1.1.1 255.255.255.0Router0 (config-if) # no shutdown Router0 (config-if) # exit // configure the ip address R1 (config) under the interface) # username 123 password cisco // set the username and password used for Logon R1 (config) # ip domain-name www.123.com // set the domain name R1 (config) # crypto key generate rsaThe name for the keys will be: R1.www. 123. comChoose the size of the key modulus in the range of 360 to 2048 for your General Purpose Keys. choosing a key modulus greater than 512 may take a few minutes. how many bits in the modulus [512]: 1024% Generating 512 bit RSA keys, keys will be non-exportable... [OK] R1 (config) # line vty 0 4 R1 (config-line) # transport input ssh // enable the ssh service function R1 (config-line) # login localR1 (config-line) # exit R2 configuration: Router (config) # line console 0 Router (config-line) # exec-timeout 0 0 Router (config-line) # logging synchronous Router (config-line) # exit Router (config) # no ip do lo Router (config) # ho Router2 Router2 (config) # interface f0/0Router2 (config-if) # ip address 12.1.1.2 route 255.255.0router2 (config-if) # no shutdown Router2 (config-if) # exit R2 # ssh-l 123 12.1.1.1 // ssh logon Password: R1>