Home | 简体中文 | 繁体中文 | 杂文 | 打赏(Donations) | ITEYE 博客 | OSChina 博客 | Facebook | Linkedin | 知乎专栏 | Search | Email

11.4. Login & Password

例 11.1. 2811

更改路由器名、密码

			
Router(config)#
Router(config)#enable password cisco		enable password和enable secret命令可以修改特权模式的密码。
Router(config)#enable secret cisco			进入line console局部配置模式下,修改console登录密码;进入line vty局部配置模式,修改telnet登录的密码。login命令指出需要登录,修改密码的命令都是password。
			
			

console

Router(config)#line console 0
Router(config-line)#login
Router(config-line)#password cisco
Router(config-line)#exit			
			

telnet

			
Router(config)#line vty 0 4
Router(config-line)#login
Router(config-line)#password cisco			
			
			

例 11.2. 2911

2911(config)#crypto key generate rsa
The name for the keys will be: 2911.cisco.com
Choose the size of the key modulus in the range of 360 to 4096 for your
  General Purpose Keys. Choosing a key modulus greater than 512 may take
  a few minutes.

How many bits in the modulus [512]: 2048
% Generating 2048 bit RSA keys, keys will be non-exportable...
[OK] (elapsed time was 13 seconds)
			
ip access-list standard login
 permit 192.168.50.0 0.0.0.128
!
			
line vty 0 4
 access-class login in
 privilege level 15
 login local
 transport input telnet ssh			
			
			
username cisco privilege 15 secret your_password	#超级用户,不需要enable
username mgmt secret your_password