Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

Strong secrets

Direct answer

Strong secrets means using enable secret and username … secret with modern hashing (type 8 or 9), long passwords and no default or shared credentials.

When to use this

Use it when auditing or setting device passwords and secrets.

First 30 seconds

1. Use enable secret and username secret with type 9 (scrypt) or 8.

2. Avoid type 7 and type 5 where possible.

3. Long unique secrets.

4. Store in a vault.

5. Rotate.

Operational verification

secret configured with strong hash → stored → verified at login

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Cisco IOS / IOS XE
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformCisco IOS / IOS XE · IOS/IOS XE
Key commandshow running-config | include secret|password
Scope / prerequisiteUse it when auditing or setting device passwords and secrets.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Common mistakes Narrow the fault
  • service password-encryption treated as real protection (type 7 is reversible).
  • Reusing the same enable secret on every device.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Command lookup Jump straight to Cisco syntax
Key points
  • SSHv2 protects the session; VTY policy still controls who may connect and how users authenticate
  • Use a dedicated management VRF/interface where supported and restrict sources with ACL/firewall policy
  • Disable Telnet and unused HTTP services
  • Prefer named administrators, AAA, least privilege, timeouts and audit logging
  • Preserve an out-of-band recovery path before changing remote access.
Key checks
  • show running-config | include secret|password — secret types
  • show running-config | include service password-encryption — type 7 obfuscation
ReferenceWhat it is1 section · depth on demand

IOS password types

TypeAlgorithmStatus
0Clear textNever
7Reversible (Vigenère)Broken — decodable instantly
5MD5Weak
8PBKDF2-SHA-256Good
9scryptRecommended
enable algorithm-type scrypt secret <secret>
username admin privilege 15 algorithm-type scrypt secret <password>

Documented example, not captured output. Search configs for password 7 and secret 5 and replace them.

ReferenceWhy it matters1 section · depth on demand

How it works

Cisco IOS stores secrets in several formats. Type 7 is reversible obfuscation and type 5 (MD5) is weak; use type 8 (PBKDF2-SHA-256) or type 9 (scrypt). service password-encryption only hides type 0 passwords as type 7 — it is not real protection.

ReferenceImportant terms & boundaries1 section · depth on demand

In depth

Inventory what is stored today

show running-config | include secret|password|key-string
Seen in configTypeAction
password 0 ... / plain text0Replace immediately
password 7 0822455D0A167Treat as plain text — reversible; rotate the secret
secret 5 $1$...5 (MD5)Weak; re-enter as type 9 or 8
secret 8 $8$...8 (PBKDF2-SHA-256)Acceptable, sometimes chosen for compliance
secret 9 $9$...9 (scrypt)Preferred for login secrets

Cisco's guidance treats type 7 as plain text and MD5 as too weak for stored secrets.

Hashed login secrets

enable algorithm-type scrypt secret <secret>
username admin privilege 15 algorithm-type scrypt secret <secret>
security passwords min-length 14
login block-for 120 attempts 5 within 60

Hashes are one-way: the device can verify a login, but nobody can read the secret back from the configuration.

Secrets the device must be able to use

Some keys must be recoverable by the device itself — routing protocol authentication, RADIUS/TACACS+ keys, pre-shared keys. For those, type 6 (AES, reversible with a device-local master key) replaces type 7:

key config-key password-encrypt <master-key>
password encryption aes

The master key is not in the configuration; a configuration copied to another device needs the same master key to work. service password-encryption (type 7) only hides secrets from casual viewing.

Operating practice

  • Prefer central AAA (TACACS+/RADIUS) with one local fallback account.
  • Rotate shared secrets when staff leave or a configuration backup is exposed.
  • Treat configuration backups as secret material: type 7 and weak hashes in a leaked backup are compromised credentials.
Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
ReferenceConfiguration & state1 section · depth on demand

Configuration

enable algorithm-type scrypt secret <secret>
username admin privilege 15 algorithm-type scrypt secret <secret>
security passwords min-length 12
show running-config | include secret|password

Documented example, not captured output.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docCisco IOS / IOS XE Current documentation reviewed 2026-09-14

Authoritative/upstream documentation reviewed for bounded claims in Security → Device Hardening → Strong secrets. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.cisco.com/c/en/us/support/ios-nx-os-software/ios-xe-17/series.html · confidence 94%
Confirmation

Confirm action

Continue?