Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1401932
  • 博文数量: 269
  • 博客积分: 3602
  • 博客等级: 中校
  • 技术积分: 4535
  • 用 户 组: 普通用户
  • 注册时间: 2012-04-17 21:13
文章分类

全部博文(269)

文章存档

2014年(8)

2013年(139)

2012年(122)

分类: 系统运维

2013-02-28 14:14:36

Set Passwords:

有5种用于加密你的Cisco router:
1.控制口(console)
2.辅助口(AUX)
3.VTY
4.enable password
5.enable secret

Enable Passwords

enable password:给console和AUX口加密,防止未授权用户进入特权模式,但是密码是非加密形式
enable secret:给console和AUX口加密,防止未授权用户进入特权模式,密码是加密形式,并且一旦起用了这个密码,将凌驾于enable password之上,如果同时设置了enable password和enable secret的情况下,必须输入不同的密码,如下:
(config)#enable password 123
Router(config)#enable secret 123
The enable password you have chosen is the same as your enable secret.This is not recommended.Re-enter the enable password
Router(config)#enable secret 321

如果VTY线路的密码没有设置,你将无法使用telnet来连上它

Auxiliary Password

AUX密码:
Router#conf t
Router(config)#line aux ?
<0-0> First line number
Router(config)#line aux 0
Router(config-line)#login
Router(config-line)#password 123

Console Password

配置console密码以及一些辅助命令:
Router#conf t
Router(config)#line console ?
<0-0> First line number
Router(config)#line console 0
Router(config-line)#login
Router(config-line)#password 123
Router(config-line)#exec-timeout ?
<0-35791> Timeout in minutes
Router(config-line)#exec-timeout 0 ?
<0-2147483> Timeout in seconds

Router(config-line)#exec-timeout 0 0
Router(config-line)#logging synchonous
exec-timeout命令:如果X分钟X秒不活动的话将自动退出,默认是10分钟,0 0代表永远不自动退出
logging synchronous:光标跟随

Telnet Password

配置VTY密码:如果你的IOS不是企业版(Enterprise edition),默认你只能有5条VTY线路,线路0到4.配置如下:
Router(config-line)#line vty 0 ?
<1-4> Last Line Number

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

刚才说过了,如果你的VTY线路没有配置密码的话,你将无法telnet连上它,它会报错:VTY线路没有配置密码.但是你可以取消VTY密码,这 样就可以在没有密码的情况下进行telnet,处于安全考虑,此方法不推荐,配置如下:
Router(config-line)#line vty 0 4
Router(config-line)#no login

Encryption Your Passwords

只有enable secret是加密的,当你在特权模式下输入sh running-config显示DRAM的配置文件时,其他密码将被罗列出来:
Router#sh run
(略)
!
enable secret jhdflkdfg$#sdf
enable password 123
!
(略)

对密码进行加密:在全局配置模式下使用service password-encryption命令

Banners

banner类似标语,问候语.最常用的是MOTD(message of the day),分界符用于分隔信息,但是分隔符不能出现在MOTD信息中,如下:
Router(config)#banner motd #
The Router is mine
#
Router(config)#^Z(Ctrl+Z)
Router#exit
Router con0 is now available
Press RETURN to get started
The Router is mine
Router>

其他的3种banner:
1.exec banner
2.incoming banner
3.login banner

阅读(2565) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~