Cisco设置各种密码

设置Console登录

命令如下

sh 复制代码
# 进入console  0
Router(config)#line console 0

# 设置密码
Router(config-line)#password 123456

# 启用登录需要密码
Router(config-line)#login

测试

退出后发现需要密码登录

sh 复制代码
User Access Verification

Password: 
Password: 

关闭密码

sh 复制代码
Router(config-line)#no login

设置进入特权模式的密码(设置进入enable模式密码)

命令

方式一

sh 复制代码
# 用于限制人员访问特权执行模式,密码没有加密,配置文件可以看到
Router(config)#enable password en_pass

方式二(常用)

sh 复制代码
Router(config)#enable secret ?
  0      Specifies an UNENCRYPTED password will follow
  5      Specifies a MD5 HASHED secret will follow
  8      Specifies a PBKDF2 HASHED secret will follow
  9      Specifies a SCRYPT HASHED secret will follow
  LINE   The UNENCRYPTED (cleartext) 'enable' secret
  level  Set exec level password
sh 复制代码
# 经加密,用于限制人员访问特权执行模式,密码已加密,配置文件看不到
Router(config)#enable secret en_secret
Router(config)#

查看配置文件如下

sh 复制代码
Router#show running-config 
Building configuration...

Current configuration : 1346 bytes
!
! Last configuration change at 18:30:12 UTC Sun Nov 12 2023
!
version 15.7
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Router
!
boot-start-marker
boot-end-marker
!
!
enable secret 5 $1$IHgn$b3ydJ0OZovLoELALjiDur/
enable password en_pass
!
no aaa new-model
!
!
!

可以看到enable secret的密码是加密的,当enable secret 和enable password同时存在时候,enable secret设置的密码生效

测试

sh 复制代码
# 从用户模式进入特权模式需要设置密码
Router>enable
Password: 
Password: 

vty密码

用于限制人员通过Telnet访问设备

sh 复制代码
# 配置vty
Router(config)#line  vty 0 4

# 设置Telnet登录密码为vty_pass
Router(config-line)#password vty_pass

# login表示登录时候需要密码验证
Router(config-line)#login
Router(config-line)#
相关推荐
(:满天星:)3 小时前
第31篇:块设备与字符设备管理深度解析(基于OpenEuler 24.03)
linux·运维·服务器·网络·centos
小陶来咯3 小时前
【仿muduo库实现并发服务器】Acceptor模块
运维·服务器
cui_hao_nan3 小时前
Docker后端部署
运维·docker·容器
ZZH1120KQ4 小时前
Linux系统安全及应用
linux·运维·系统安全
小扎仙森4 小时前
关于服务器宝塔转移wordperss子比主题问题
运维·服务器
小小小糖果人4 小时前
Linux云计算基础篇(5)
linux·运维·服务器
我不是哆啦A梦4 小时前
破解风电运维“百模大战”困局,机械版ChatGPT诞生?
运维·人工智能·python·算法·chatgpt
weixin_7714323115 小时前
linux系统 weblogic10.3.6(jar) 下载及安装
linux·运维·jar
scuter_yu5 小时前
主流零信任安全产品深度介绍
运维·网络·安全
开开心心就好5 小时前
免费PDF处理软件,支持多种操作
运维·服务器·前端·spring boot·智能手机·pdf·电脑