Use it when bringing a new router or switch into production, or when auditing existing devices.
Device Hardening
Device hardening reduces a network device's attack surface: secure management protocols only, restricted management access, strong local credentials, disabled unused services and ports, logging and time sync.
1. Verify management interface/VRF and return route.
2. Verify SSH keys/version and VTY transport.
3. Verify ACL and AAA method list.
4. Test from an allowed source in a second session.
5. Confirm logs and recovery access.
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
enable secret <secret>Primary Commands
Configuration and operational commands for this Topic.
enable secret <secret>ReferenceSet the privileged EXEC password using a hashed secret.
Use when: Use this command at the Device Management / SSH / Management Plane boundary in the documented evidence chain.
Quick note: Cisco IOS / IOS XE first. A listening SSH service does not prove VTY ACL, AAA, authorization, return routing or safe recovery.
Cisco IOS / IOS XE · mixedusername <user> privilege <level> secret <secret>ReferenceCreate a local user with a privilege level and a hashed secret.
Use when: Use this command at the Device Management / SSH / Management Plane boundary in the documented evidence chain.
Quick note: Cisco IOS / IOS XE first. A listening SSH service does not prove VTY ACL, AAA, authorization, return routing or safe recovery.
Cisco IOS / IOS XE · mixedservice password-encryptionReferenceObfuscate plain-text passwords in the configuration (weak type 7, not real encryption).
Use when: Use this command at the Device Management / SSH / Management Plane boundary in the documented evidence chain.
Quick note: Cisco IOS / IOS XE first. A listening SSH service does not prove VTY ACL, AAA, authorization, return routing or safe recovery.
Cisco IOS / IOS XE · mixedsecurity passwords min-length <length>ReferenceRequire a minimum password length for new passwords.
Use when: Use this command at the Device Management / SSH / Management Plane boundary in the documented evidence chain.
Quick note: Cisco IOS / IOS XE first. A listening SSH service does not prove VTY ACL, AAA, authorization, return routing or safe recovery.
Cisco IOS / IOS XE · mixedlogin block-for <seconds> attempts <count> within <seconds>ReferenceBlock logins for a period after repeated failed attempts.
Use when: Use this command at the Device Management / SSH / Management Plane boundary in the documented evidence chain.
Quick note: Cisco IOS / IOS XE first. A listening SSH service does not prove VTY ACL, AAA, authorization, return routing or safe recovery.
Cisco IOS / IOS XE · mixedbanner motd <delimiter>ReferenceSet the message-of-the-day banner shown before login.
Use when: Use this command at the Device Management / SSH / Management Plane boundary in the documented evidence chain.
Quick note: Cisco IOS / IOS XE first. A listening SSH service does not prove VTY ACL, AAA, authorization, return routing or safe recovery.
Cisco IOS / IOS XE · mixedexec-timeout <minutes> <seconds>ReferenceDisconnect idle line sessions after the given time.
Use when: Use this command at the Device Management / SSH / Management Plane boundary in the documented evidence chain.
Quick note: Cisco IOS / IOS XE first. A listening SSH service does not prove VTY ACL, AAA, authorization, return routing or safe recovery.
Cisco IOS / IOS XE · mixedVerification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification and output interpretation Verify boundary
Verify the running configuration against the intended baseline, then confirm exposed listeners and management reachability from both authorized and unauthorized source contexts. Check AAA/SSH/session behavior, logging and time synchronization independently. A configuration line showing a service disabled is useful evidence, but the practical control is the resulting reachable surface and policy outcome. Preserve device role and management path context when comparing baselines. Verify the complete management path from a representative authorized source: routing to the management address, permitted transport, negotiated secure protocol, identity result, privilege/authorization and command/session behavior. Device-side session/service state should be correlated with AAA/server logs where remote identity is used. A TCP connection to port 22 or an SSH banner only shows part of the path, but it does not show credential acceptance, authorization, correct privilege or the availability of a safe recovery method.
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.
Subtopics
Go one level deeper into this subject.
Disabling unused services reduces the attack surface: turn off the HTTP server, CDP or LLDP on untrusted ports, small servers, finger and other services the device does not need.
Subtopic Secure management protocolsSecure management protocols — SSH, HTTPS, SNMPv3 and SCP/SFTP — encrypt and authenticate management traffic, replacing Telnet, HTTP, SNMPv1/v2c and TFTP.
Subtopic Local usersLocal users are accounts stored on the device (username <name> privilege <n> secret <password>) used for login or as fallback when AAA servers are unreachable.
Subtopic Strong secretsStrong secrets means using enable secret and username … secret with modern hashing (type 8 or 9), long passwords and no default or shared credentials.
show running-config | section line vty— transport input and access-class.show ip ssh— SSH version and enabled.show ip http server status— HTTP/HTTPS server state.show control-plane host open-ports— services listening on the device.show interfaces status | include disabled|notconnect— unused ports.show ntp associationsandshow logging— time and logs.
ReferenceWhat it is1 section · depth on demand
What it is
Path: Networking → Security → Device Hardening. Local intent: Device Hardening: Disable unused services, Secure management protocols, Local users, Strong secrets.
ReferenceImportant terms & boundaries4 sections · depth on demand
In depth
Device hardening
Hardening reduces the ways a network device can be attacked. Cisco's IOS hardening guide covers it plane by plane: disable unused services, use secure management protocols and AAA, protect passwords, restrict management access, send logs centrally with accurate timestamps, protect the control plane with CoPP, and filter traffic aimed at infrastructure addresses with infrastructure ACLs.
Hardening checklist (hardening guide)
| Area | Measures |
|---|---|
| Services | Disable small servers, finger, BOOTP, PAD, unused HTTP/HTTPS, CDP/LLDP on untrusted links |
| Management access | SSHv2 only, exec timeouts, management ACLs, Management Plane Protection |
| Credentials | enable secret, type 9 (scrypt) user secrets, login failure lockout |
| AAA | TACACS+ with authorisation and accounting, local fallback |
| Logging | Remote syslog, buffered logs, millisecond timestamps, fixed source interface |
| Control plane | CoPP, routing protocol authentication |
| Data plane | Infrastructure ACLs, disable source routing, ICMP redirects, directed broadcasts |
| Physical | no service password-recovery where appropriate |
R1(config)# service timestamps log datetime msec show-timezone
R1(config)# logging host 10.99.0.20
R1(config)# logging source-interface Loopback0
R1(config)# no logging console
R1(config)# aaa local authentication attempts max-fail 5
R1(config)# line vty 0 15
R1(config-line)# exec-timeout 10 0
R1(config-line)# transport input ssh
R1(config-line)# access-class MGMT-HOSTS in vrf-also
R1(config)# no ip source-route
R1(config)# interface GigabitEthernet0/0/0
R1(config-if)# no ip redirects
R1(config-if)# no ip proxy-arp
Hardening topics in this reference
| Topic | Focus |
|---|---|
| Disable unused services | Reduce attack surface |
| Secure management protocols | SSH, HTTPS, SNMPv3, SCP |
| Console, SSH, Telnet, HTTP/HTTPS | Each access path |
| Password policy, AAA | Who may log in, how |
| CoPP | Protect the CPU |
Keeping devices hardened
Put the baseline in templates, audit devices against it regularly, and review it after each new advisory or software release.
Documented example, not captured output.
Quick reference
Device hardening reduces the attack surface of routers and switches: disable unused services, secure management access, protect the control plane, and keep software current.
| Hardening item | Example |
|---|---|
| Secure management | SSHv2 only, transport input ssh, VTY ACL |
| Authentication | AAA with TACACS+/RADIUS, local fallback with type 9 secrets |
| Unused services off | no ip http server, no cdp run on edges |
| Control plane | CoPP |
| Logging/time | Syslog, NTP with authentication |
| Software | Current release, PSIRT review |
Cisco publishes hardening guides per platform; use them as the baseline checklist.
State model and technical mechanics
Hardening is a collection of control reductions rather than one feature. The effective attack surface includes enabled services, management listeners, local/remote identities, privilege mechanisms, discovery/control features, legacy protocols and physical/console paths. A secure baseline therefore starts by knowing what the device must do and removing or constraining what it does not need. Configuration state should be read together with runtime listeners and management-plane reachability because a disabled command path and an unreachable service are different facts. Management-plane security protects how administrators reach and control the device. The effective path includes the listening service, transport protection, identity source, VTY/line selection, AAA policy, privilege/authorization and any management ACL or VRF. Each layer can be healthy while another blocks access. Cryptographic transport protects confidentiality/integrity in transit, while authentication and authorization decide who may connect and what they may do after connection; those are related but distinct controls.
Limits and common misconceptions
Hardening is risk reduction, not evidence of security. A device can satisfy a baseline and still contain software vulnerabilities, weak upstream controls or compromised credentials. Conversely, an intentionally enabled service is not automatically insecure when appropriately constrained. Keep configuration baseline, software lifecycle, identity, network exposure and monitoring as distinct controls rather than using a single hardening score as a security verdict. Management security is not equivalent to data-plane security. An SSH service can be hardened while transit traffic remains exposed, and a correctly applied management ACL can block an administrator without indicating a routing failure. Disabling Telnet or HTTP is useful hygiene but is not a complete hardening model. Separate service exposure, crypto, identity, authorization, source restriction and recovery access as evidence layers. Preserve enough context for ChatGPT to reason about a live access issue without embedding an interactive remediation tree in Pcornel.
ReferenceConfiguration & state1 section · depth on demand
Design and configuration model
Build a documented baseline: secure privileged secrets, AAA with recovery, SSH/HTTPS as required, management ACL/VRF, logging/time sync, disabled unused services and explicit SNMP policy. Prefer deterministic templates over one-off hardening. Do not blindly remove protocols that are operational dependencies; first identify why they exist. Store secrets outside documentation and use the Round-trip content model for intent, not production credentials. Prefer encrypted management protocols, limit reachable management interfaces, restrict source networks with explicit policy, and integrate AAA without removing a validated recovery path. Device-hardening changes should be staged so disabling legacy services does not also remove the only available access mechanism. Keep keys, local secrets and AAA server configuration out of shared examples. Management source interfaces/VRFs should be stable and documented because they influence return routing, ACL matching and AAA server policy.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Security → Device Hardening. 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%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
Device Management / SSH / Management Plane evidence chain
Configuration, operational state, counters and downstream proof remain separate.
| Boundary | Question | Evidence | Does not prove |
|---|---|---|---|
| Definition | What is configured or intended? | running configuration / controller policy | live operation |
| Local state | Is the feature active at the expected scope? | show ip ssh | remote success |
| Counters | Did controlled traffic or an event reach this stage? | scoped counters/timestamps | complete return path |
| Next boundary | What consumes or transports this state? | admin source → management path/ACL → SSH/HTTPS transport → AAA → privilege → logging → recovery path | application success |
Device Hardening · technical reference
Compact network access/security mechanics, policy and evidence boundaries for fast lookup.
| Layer | Reference intent |
|---|---|
| Services | Disable or constrain what is not required |
| Identity | Strong AAA + recovery |
| Management path | Encrypted and source-restricted |
| Evidence | Runtime exposure + logs, not config text alone |