我快疯了!我在路由器上设置了密码,但我想不出有什么地方可能出错!我甚至在被路由器锁定之前保存了配置,我会与你分享。我知道如何恢复密码,但我只是想知道我之前输入的命令有什么问题!我遗漏了什么吗?请告诉我
我的混乱就开始了!
amm-router>
amm-router>
amm-router>en
amm-router#ccof t
^
% Invalid input detected at '^' marker.
amm-router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
amm-router(config)#line console 0
amm-router(config-line)#ogin
^
% Invalid input detected at '^' marker.
amm-router(config-line)#login
% Login disabled on line 0, until 'password' is set
amm-router(config-line)#password
% Incomplete command.
amm-router(config-line)#password ae7admin
amm-router(config-line)#^Z
amm-router#
*Dec 25 18:16:26.490: %SYS-5-CONFIG_I: Configured from console by console
amm-router#exit
amm-router con0 is now available
Press RETURN to get started.
User Access Verification
Password:
amm-router>en
amm-router#
amm-router con0 is now available
Press RETURN to get started.
User Access Verification
Password:
amm-router>
amm-router>
amm-router>
amm-router>
amm-router>
amm-router>
amm-router>conf t
^
% Invalid input detected at '^' marker.
amm-router>conf t
^
% Invalid input detected at '^' marker.
amm-router>en
amm-router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
amm-router(config)#line console 0
amm-router(config-line)#no password
amm-router(config-line)#end
amm-router#
*Dec 26 00:39:36.084: %SYS-5-CONFIG_I: Configured from console by console
amm-router#copy run start
Destination filename [startup-config]?
Building configuration...
[OK]
amm-router#log out
^
% Invalid input detected at '^' marker.
amm-router#end
Translating "end"...domain server (192.168.1.1)
(192.168.1.1)
Translating "end"...domain server (192.168.1.1)
% Bad IP address or host name
% Unknown command or computer name, or unable to find computer address
amm-router#^Z
amm-router#exit
amm-router con0 is now available
Press RETURN to get started.
amm-router>
amm-router>
amm-router>en
amm-router#
amm-router#
amm-router#line console 0
^
% Invalid input detected at '^' marker.
amm-router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
amm-router(config)#line console 0
amm-router(config-line)#login
% Login disabled on line 0, until 'password' is set
amm-router(config-line)#login ?
local Local password checking
<cr>
amm-router(config-line)#login local
amm-router(config-line)#username
amm-router(config-line)#username ae7admin secret password
amm-router(config-line)#username ae7admin secret password ae7admin
amm-router(config)#
amm-router(config)#end
amm-router#ena
*Dec 26 00:41:36.044: %SYS-5-CONFIG_I: Configured from console by console
amm-router#enable secret ae7admin
^
% Invalid input detected at '^' marker.
amm-router#enable secret ae7admin
amm-router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
amm-router(config)#enable s
amm-router(config)#enable secret ae7admin
amm-router(config)#line vty 0 15
amm-router(config-line)#login local
amm-router(config-line)#user
amm-router(config-line)#username ae7admin secret password ae7admin
amm-router(config)#
amm-router(config)#
amm-router(config)#
amm-router(config)#^Z
amm-router#
amm-router#
amm-router#
*Dec 26 00:43:29.832: %SYS-5-CONFIG_I: Configured from console by console
amm-router#show run
amm-router#show running-config
Building configuration...
Current configuration : 1589 bytes
!
! Last configuration change at 00:43:29 UTC Sat Dec 26 2015
version 15.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname amm-router
!
boot-start-marker
boot-end-marker
!
!
enable secret 4 QwLCYWKCJNIfpMMUinHjBoG0qjxCQ2DhbtSFKwMz6QY
!
no aaa new-model
memory-size iomem 15
!
ip cef
!
!
!
!
!
!
!
!
no ipv6 cef
multilink bundle-name authenticated
!
!
!
!
license udi pid CISCO2921/K9 sn FTX1727AHSX
license accept end user agreement
license boot module c2900 technology-package datak9
!
!
username ae7admin secret 4 aSQEuYE5xWNSUVzXBzAulkBYFjwogPRPhZpiyofmfP2
!
redundancy
!
!
!
!
!
!
interface Embedded-Service-Engine0/0
no ip address
shutdown
!
interface GigabitEthernet0/0
ip address dhcp
duplex auto
speed auto
!
interface GigabitEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface GigabitEthernet0/2
no ip address
shutdown
duplex auto
speed auto
!
!
ip forward-protocol nd
!
no ip http server
no ip http secure-server
!
ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/0
!
!
!
!
control-plane
!
!
!
line con 0
exec-timeout 60 0
logging synchronous
login local
history size 100
line aux 0
line 2
no activation-character
no exec
transport preferred none
transport output lat pad telnet rlogin lapb-ta mop udptn v120 ssh
stopbits 1
line vty 0 4
exec-timeout 60 0
logging synchronous
login local
history size 100
transport input all
line vty 5 15
exec-timeout 60 0
logging synchronous
login local
history size 100
transport input all
!
scheduler allocate 20000 1000
!
end
amm-router#
amm-router#
amm-router#copy run st
amm-router#copy run startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
amm-router#
amm-router#
amm-router#
amm-router#exit
amm-router con0 is now available
Press RETURN to get started.
User Access Verification
Username: ae7admin
Password:
% Login invalid
Username: ae7admin
Password:
% Login invalid
Username:
% Username: timeout expired!
amm-router con0 is now available
Press RETURN to get started.
User Access Verification
Username: ae7admin
Password:
% Login invalid
Username: ae7admin
Password:
% Login invalid
Username:
% Username: timeout expired!
amm-router con0 is now available
Press RETURN to get started.
User Access Verification
Username: ae7admin
Password:
% Login invalid
Username: ae7admin secret
Password:
% Login invalid
Username:
% Username: timeout expired!
amm-router con0 is now available
Press RETURN to get started.
答案1
原因:您在添加密码之前尝试登录。
为 console 0 行添加密码
router> en
router# config t
router(config)# line console 0
router(config)# password (yourpassword)
router(config)# login