hq8501 发表于 2018-7-17 10:23:16

Cisco router 配置密码策略

  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的情况下,必须输入不同的密码,如下:
  Router(config)#enable password 123
  Router(config)#enable secret 123
  The enable password you have chosen is the same as your enablesecret.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
  <cr>
  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
  <cr>
  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是加密的,当你在特权模式下输入shrunning-config显示DRAM的配置文件时,其他密码将被罗列出来:
  Router#sh run
  (略)
  !
  enable secret jhdflkdfg$#sdf
  enable password 123
  !
  (略)
  对密码进行加密:在全局配置模式下使用service password-encryption命令
  Banners
  banner类似标语,问候语.最常用的是MOTD(message of theday),分界符用于分隔信息,但是分隔符不能出现在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
页: [1]
查看完整版本: Cisco router 配置密码策略