1、設置全局密碼
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#enable password contoso
Switch(config)#end
2、設置console密碼
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#line console 0
Switch(config-line)#password contoso
Switch(config-line)#login
Switch(config-line)#end
3、設置telnet密碼
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#line vty 0 4
Switch(config-line)#password contoso
Switch(config-line)#login
Switch(config-line)#end