Hardening Cisco Nexus switches running NX-OS starts with who and what can log in to them: administrators, AAA servers, backup tools and automation that talks to NX-API. Nexus switches sit at the heart of data centre fabrics, so a compromised management session can reroute or inspect traffic for every workload behind them. Many of the accounts that touch these switches are non-human: configuration backup jobs, monitoring pollers and orchestration platforms.
This guide covers standalone NX-OS on Nexus switches. It focuses on management plane identity, role-based access control, automation credentials, control and data plane protections, and software currency. Campus and branch platforms running IOS XE are covered in the separate Cisco IOS XE Hardening Guide, and this page does not repeat that material.
This is an independent guide from NHI Mgmt Group, based on Cisco's public documentation as of November 2026. It is not sponsored or reviewed by Cisco. Product features change, so confirm settings against Cisco's current documentation for your platform and release.
Key takeaways
- NX-OS has no enable secret. Privilege comes entirely from RBAC roles such as
network-admin, so role design is the core control. - Give automation and backup tools custom roles with explicit command rules, not
network-admin. - Centralise authentication with TACACS+, add command authorisation, and never configure a
nonefallback. - Lock down NX-API: certificates, TLS 1.2, no weak ciphers and the management VRF only.
- Apply Control Plane Policing, and keep software current. Cisco's October 2026 NX-OS hardening release fixes critical vulnerabilities with no workarounds.
How privilege works on NX-OS
NX-OS handles privilege differently from many other network operating systems. According to the Cisco Nexus OS Software Security Primer, there is no enable secret on NX-OS. Privilege comes from role-based access control, with built-in roles such as network-admin and vdc-admin. A local account is created with its role in one line, for example username admin password <password> role network-admin.
The consequence is simple. Every account, human or machine, has exactly the privilege of the roles assigned to it. There is no second password to climb to full control. That makes role assignment the single most important hardening decision on a Nexus switch.
The primer also notes that password strength checking is on by default and can be disabled with no password strength-checking, which Cisco does not recommend. Leave it on.
Recommended practices from NHI Mgmt Group:
- Keep local accounts to a minimum: a break-glass administrator stored in a vault, plus any local accounts that must survive AAA outages.
- Do not share the default
adminaccount between people or tools. Each human and each tool gets its own named account so logs show who did what. - Review local accounts with
show running-configagainst your inventory after every change window.
Custom roles for automation and backup accounts
Configuration backup and monitoring tools are the most common non-human identities on Nexus switches. They log in many times a day, often with stored passwords, and are frequently given network-admin because it is quick.
Cisco's support document on configuring user RBAC for configuration backup tools shows the alternative: a custom role that permits only the commands the tool runs. For a tool that needs version, inventory and running configuration output, the example on Nexus 9000 (NX-OS 7.0(3)I7(1) or later) is:
role name oxidized
description Role for Oxidized network device configuration backup tool
rule 1 permit command terminal length 0
rule 2 permit command show version
rule 3 permit command show inventory
rule 4 permit command show running-config
The account is then created with username <name> role <role> password <password>. Cisco warns that the terminal length 0 rule must not be forgotten, or the tool receives a permission denied error and stalls on paged output.
The same document notes that some tools' default command lists can only be run through the predefined network-admin role. Where that is the case, change the tool's command list rather than accepting full administrator rights for a backup job. Cisco states there is no formal verification procedure for this configuration; test by logging in as the new account and running each command.
A backup account that can read the full running configuration is a high-value credential, and the archive it builds is a high-value data store, because device configurations describe the network's authentication and access settings. ATT&CK tracks this as T1602 Data from Configuration Repository.
Recommended practices from NHI Mgmt Group for automation accounts:
- One custom role per tool, named after the tool, with a description recording the owner.
- Store the tool's credential in a secrets manager and rotate it on a schedule and whenever the tool's operators change.
- Restrict where the tool can connect from using the CoPP and management access lists described below.
- Encrypt and access-control the configuration archive the tool produces.
AAA, TACACS+ and command authorisation
The primer shows TACACS+ as the central authentication path:
feature tacacs+tacacs-server host <ip-address-of-tacacs-server>tacacs-server key [0 | 6 | 7] <key>aaa authentication login default group tacacs+
For resilience, the primer shows aaa authentication login default fallback error local, which falls back to local accounts only when the AAA servers are unreachable. It advises against the none fallback, which would allow access without authentication.
Authentication alone is not enough for administrator sessions. The primer shows command authorisation for both exec and configuration commands:
aaa authorization commands default group <server group> [local]aaa authorization config-commands default group <server group> [local]
With these in place, the AAA server decides whether each command is allowed, and you gain a central record of what was run. For one-time passwords, the primer notes that aaa authentication login ascii-authentication is needed, with ASCII mode enabled on the TACACS+ side.
The TACACS+ shared key is itself a non-human secret shared between every switch and the AAA servers. Record it in your secrets inventory and plan its rotation, which requires coordinated change on both sides.
SSH and management sessions
The primer states that NX-OS supports SSHv2 only. It shows the following building blocks:
feature sship domain-name example.comas a prerequisite for key generationssh key rsa 2048ssh login-attempts <1-10>, with a default of 3feature scp-serverandfeature sftp-serverfor secure file transfer
Telnet is offered during initial setup. The primer recommends SSH instead, so decline Telnet during setup and confirm it is not enabled afterwards.
Set idle timeouts on both console and virtual terminal lines with exec-timeout <minutes> under line console and line vty. The primer gives the default as 30 minutes; most organisations choose a shorter value for administrator sessions.
Enable the SCP or SFTP server only when you need it, for example during image transfer, and disable it afterwards if your change process allows.
NX-API and programmatic access
NX-API lets automation platforms send commands and receive structured output over HTTP or HTTPS. Every orchestration tool that uses it is a non-human identity with the privileges of the account it authenticates as.
The NX-API CLI security documentation explains that after a user authenticates, NX-API issues a session cookie named nxapi_auth, which expires after 600 seconds and is not configurable. NX-API CLI uses HTTPS to secure and encrypt data.
The NX-API management documentation lists the commands that shape exposure:
- Certificates:
nxapi certificate httpscrt certfile <file>followed bynxapi certificate enable. The documentation notes you cannot enable a certificate in the same request used to configure the key or certificate file. Use a certificate issued by your own certificate authority. - Protocols:
nxapi ssl protocolssets the allowed TLS versions. Configure TLS 1.2 only, unless your release and clients support a newer version. - Ciphers:
nxapi ssl ciphers weakenables weak ciphers. Make sure it is not configured, usingno nxapi ssl ciphers weak. - VRF:
nxapi use-vrf managementbinds NX-API to the management VRF. Keep it off the default and production VRFs. - Ports:
nxapi http portandnxapi https portset listening ports. Remove the HTTP port so that only HTTPS is offered.
The documentation itself contains some inconsistencies about default TLS versions, so verify the effective settings on your release rather than relying on defaults.
Recommended practices from NHI Mgmt Group:
- Give each automation platform its own account with a custom role limited to the commands it runs.
- Enable NX-API only on switches that are actually managed through it.
- Track which platform owns each NX-API account, and remove the account when the platform is retired.
SNMP, logging and discovery protocols
The primer notes that SSH, SNMP and NTP are enabled by default, while other small TCP and UDP servers are not running by default. It recommends SNMPv3 over SNMPv2c, because v2c sends community strings in clear text. An SNMP community string is effectively a shared password held by every monitoring poller, so moving to SNMPv3 with per-user credentials is both a cryptographic and an identity improvement.
For logging, the primer says syslog can be exported over UDP, TCP or SSL, and recommends remote logging to protect logs from tampering. Send logs to a central collector over an encrypted transport where your collector supports it, and alert on AAA failures, new local accounts, role changes and NX-API configuration changes.
Discovery protocols leak topology. Per the primer, CDP is enabled by default and can be disabled per interface or globally with no cdp enable. LLDP is disabled by default; enable it with feature lldp only where needed, and use no lldp transmit and no lldp receive on interfaces facing untrusted hosts.
Control plane and data plane protections
Control Plane Policing
CoPP protects the switch supervisor from floods and unwanted management traffic. The primer notes that initial setup offers Strict, Moderate, Loose or None CoPP templates, and shows a custom policy built from class-map type control-plane, policy-map type control-plane and service-policy input under control-plane, with an access list allowing SSH only from trusted hosts. Check the result with show policy-map control-plane. The primer warns that dropping traffic from untrusted hosts can also block dynamically addressed hosts, so test before rollout.
Interface and routing hygiene
The primer recommends no ip redirects, no ip unreachable and no ip proxy-arp on interfaces, and no ip source-route globally. It shows transit access lists that limit ICMP to trusted networks and drop fragments.
First-hop security
On access-facing ports, the primer describes DHCP snooping (feature dhcp, ip dhcp snooping), Dynamic ARP Inspection (ip arp inspection vlan <vlan-range>), IP Source Guard (ip verify source dhcp-snooping vlan) and port security (feature port-security, with protect, restrict, shutdown and shutdown VLAN violation modes). These limit spoofing and help keep traffic attributable to the hosts that sent it.
Link encryption
The primer describes MACsec, IEEE 802.1AE Layer 2 encryption using MKA for key exchange, and notes a licence may be required. MACsec keys are another class of machine secret to inventory.
Software currency and Cisco security advisories
Configuration hardening cannot compensate for vulnerable software. On 7 October 2026 Cisco published the Cisco NX-OS Software Security Hardening Release: October 2026 advisory, rated Critical. It covers six internally discovered vulnerabilities affecting Nexus 3000, 7000 and 9000 series switches, MDS 9000 and certain UCS Fabric Interconnects, regardless of device configuration. Cisco states the vulnerabilities were found during internal testing and are not known to be actively exploited, that there are no workarounds, and that customers should upgrade to the fixed software listed in the advisory.
Practical steps:
- Map every Nexus switch to its release train and compare it with the first fixed releases in the advisory.
- Plan migration for trains the advisory says must move to a fixed release.
- Subscribe to Cisco security advisories for NX-OS and review each release against your estate.
The primer also mentions related platform features to review: FIPS mode (which requires a reboot, and whose FIPS 140-2 validations the primer says move to historical status after 22 September 2026), consent token for time-bound, customer-authorised root shell access on Nexus 9000, and secure options for Power On Auto Provisioning (POAP) using newer DHCP options and Root-CA bundles.
Common failure patterns
- Backup tools with
network-admin. A read-only job holds full write privilege on every switch. - Shared
adminaccount. People and scripts use one account, so logs cannot attribute changes. noneAAA fallback. An AAA outage opens unauthenticated access.- No command authorisation. Authenticated administrators can run anything, with no central command record.
- NX-API on production VRFs with HTTP enabled. The API is reachable from workload networks without encryption.
- SNMPv2c community strings everywhere. One string, sent in clear text, works on every switch.
- CoPP left at a permissive default. Management services are reachable from any address.
- Unpatched release trains. Configuration is hardened, but the software carries critical vulnerabilities with no workaround.
Practitioner checklist
- Inventory every local account and every role assignment on each Nexus switch.
- Create a custom role for each backup, monitoring and automation tool with explicit command rules.
- Configure TACACS+ authentication with
fallback error local, plus exec and configuration command authorisation. - Store TACACS+ keys, local break-glass passwords and tool credentials in a secrets manager with rotation dates.
- Enforce SSH, set
ssh login-attemptsandexec-timeout, and confirm Telnet is not enabled. - Bind NX-API to the management VRF, remove the HTTP port, install your own certificate and disable weak ciphers.
- Move monitoring to SNMPv3 and send syslog to a central collector.
- Disable CDP and LLDP on interfaces facing untrusted hosts.
- Apply and test a CoPP policy that limits management protocols to trusted sources.
- Check every switch against the October 2026 NX-OS hardening advisory and upgrade to a fixed release.
Standards and references
- Cisco: Cisco Nexus OS Software Security Primer
- Cisco: NX-OS Software Security Hardening Release, October 2026
- Cisco: Configure User RBAC for Configuration Backup Tools on NX-OS
- Cisco DevNet: Configuring NX-API Management
- Cisco DevNet: NX-API CLI Security
- CISA, NSA, FBI and partners: Enhanced Visibility and Hardening Guidance for Communications Infrastructure
- CIS: Control 5 Account Management
- NIST: SP 800-53 Rev. 5
Related NHI Mgmt Group resources: Cisco IOS XE Hardening Guide · Cisco ISE Hardening Guide · NHI Authentication Guide · NHI Offboarding and Decommissioning Guide