Configuring SSH in Cisco
Task:
Configure SSH in Cisco. Make SSH the default environment for terminal lines.
Solution: Explanation: 1. Enter the privileged mode 2. Set the exact time for the key generation 3. Enter the configuration mode 4. Specify the domain name (necessary for generating the key) 5. Generate the RSA key (you will need to select the key size) 6. Activate encryption of passwords in the configuration file 7. We start a user with the user name, password Pa $$ w0rd and privilege level 15 8. Activate the AAA protocol. (at least one user must be logged in before the AAA activation) 9. Enter the configuration mode of terminal lines 0 to 4
1. cisco> enable
2. cisco# clock set 17:10:00 28 Aug 2009
3. cisco# configure terminal
4. cisco(config)# ip domain name test.dom
5. cisco(config)# crypto key generate rsa
6. cisco(config)# service password-encryption
7. cisco(config)# username user privilege 15 password 7 Pa$$w0rd
8. cisco(config)# aaa new-model
9. cisco(config)# line vty 0 4
10. cisco(config-line)# transport input ssh
11. cisco(config-line)# logging synchronous
12. cisco(config-line)# exec-timeout 60 0
13. cisco(config-line)# exit
14. cisco(config)# exit
15. cisco# copy running-config startup-config
10. Specify the default SSH as the access medium through the network
11. Activate automatic line raising after the system responds to the changes made
12. Indicate the timeout before the SSH session automatically closes in 60 minutes
13. Exit the terminal line configuration mode
14. Exit the configuration mode
15 Save the configuration file to non-volatile memory