Chinaunix首页 | 论坛 | 博客
  • 博客访问: 94405
  • 博文数量: 12
  • 博客积分: 1405
  • 博客等级: 上尉
  • 技术积分: 200
  • 用 户 组: 普通用户
  • 注册时间: 2010-12-11 00:24
文章分类

全部博文(12)

文章存档

2011年(5)

2010年(7)

我的朋友

分类: 系统运维

2010-12-15 17:00:16

Router1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router1(config)#username neoshi password ioscookbook (username weak nopassword)
Router1(config)#aaa new-model
Router1(config)#aaa authentication login local_auth local
Router1(config)#line vty 0 4
Router1(config-line)#login authentication local_auth
Router1(config-line)#exit
Router1(config)#end
 
###################################################################################
 
Router1#
注释 设置单独的用户名和密码的好处就不用多说了,这里只提一个就是在日志中会显示谁做了修
改,比如%SYS-5-RELOAD: Reload requested by kdooley on vty0 (172.25.1.1).另外在username 这个命令
里面还有一个autocommand的选项,实现登录以后自动执行某个特定的命令的作用,下面的例子就
是一个用户名为run 无密码,登录以后显示完端口状态就自动退出的例子,很好用吧
Router1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router1(config)#aaa new-model
Router1(config)#aaa authentication login default local
Router1(config)#aaa authorization exec default local
Router1(config)#username run nopassword noescape
Router1(config)#username run autocommand show ip interface brief
Router1(config)#end
阅读(2668) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2010-12-16 14:38:03

很好的, 收藏了 推荐一个博客,提供很多免费软件编程电子书下载: http://free-ebooks.appspot.com