Skip to content

CLI Login Security

The router CLI is reached over SSH and the serial console. This page covers the two System tab settings that control who can log in and how:

  • CLI Local Login Policy: the password, lockout and idle-timeout rules of the router's local accounts (the support login and the enable password).
  • CLI RADIUS / AAA Login: named administrator accounts checked by a central RADIUS server, like Cisco aaa authentication login. Each administrator logs in with a personal account, logins are accounted, and the local account is used only when no RADIUS server answers.

For where the System tab is and how its tick boxes work, see System Settings.


Local Accounts or RADIUS

Local accounts only With RADIUS / AAA
Who logs in support, one shared password per router Each administrator with a personal account (alice, bob)
Where passwords live On each router On the RADIUS server
Remove a person Change the password on every router Disable the account on the server: effective on all routers at once
Logs and accounting Show support Show the person's name; Start/Stop accounting records per session
Enable mode Shared enable password Privilege 15: directly; privilege 1: personal enable password checked by RADIUS
When the server is down — support and the local enable password work again
Password rules CLI Local Login Policy The RADIUS server's own rules; the local policy still applies to support

RADIUS users get exactly the same CLI environment as support: they can run CLI commands only, never a system shell.


Requirements

Item Requirement
Firmware Firmware with the CLI system block, on both the gateway series (HSG, CMG) and the branch series (HSA, UA, XE, UAP). See The CLI system Block.
RADIUS server Any RFC 2865 server: FreeRADIUS 3.x, Cisco ISE, Windows NPS. It must include Message-Authenticator in every reply (see RADIUS Server Setup).
Network UDP 1812 (authentication) and 1813 (accounting) from the router to the server; TCP 2083 for RadSec
RadSec (optional) The router authenticates with the device certificate that mFusion issues to it. The RadSec server must trust the mFusion device CA, and its own certificate must match the server name configured on the router.
mFusion as the server (optional) security device-login-server on mFusion, and TCP 2083 from the routers to mFusion. See CLI Login to Devices.

CLI Local Login Policy

The local policy applies to the router's local accounts: the support login (SSH and console) and the enable password. The hardened defaults apply without any configuration; tick CLI Local Login Policy only when your security policy needs different values. See Device Hardening — CLI Login Policy for the defaults, password changes, lockout handling and the Login Security column in mFusion.

GUI Configuration

Tick CLI Local Login Policy. Each rule has its own tick box and value:

CLI Local Login Policy

Field Default Range Description
Require uppercase, lowercase, number and special character On On / Off Password complexity. Also blocks passwords containing the username or hostname.
Minimum password length 12 8–64 Shortest password accepted. Unticked: the router default (12).
Password reuse policy (Exclude last X passwords) 5 1–10 Number of previous passwords that cannot be reused. Unticked: no history check.
Lockout account after X failed attempts 5 1–10 Failed logins in a row before the account locks. Unticked: no lockout.
Lockout duration (seconds) 900 60–86400 How long a locked account stays locked.
Log out idle CLI sessions after X minutes 15 1–120 Idle SSH and console sessions are logged out. Unticked: no idle timeout.

The rules apply at the next password change; existing passwords keep working. With CLI RADIUS / AAA Login, the local policy still protects support, which is used only when no RADIUS server answers.

CLI Configuration

system
 login-policy password complexity enable
 login-policy password min-length 12
 login-policy password history 5
 login-policy lockout attempts 5 unlock-time 900
 login-policy idle-timeout 15
!
Line Effect
password complexity enable Require upper and lower case, a digit and a special character (disable to turn off)
password min-length 12 Minimum password length
password history 5 The last 5 passwords cannot be reused (0 = no history)
lockout attempts 5 unlock-time 900 Lock the account for 900 seconds after 5 failed attempts (0 attempts = no lockout)
idle-timeout 15 Log out CLI sessions after 15 idle minutes (0 = never)

no login-policy under system returns all rules to the defaults.

Earlier firmware

Firmware without the system block sets the same rules under security login-policy, with the same keywords (for example password min-length 14). See Device Hardening — Adjust the Policy.


CLI RADIUS / AAA Login

How a Login Works

  1. An administrator connects over SSH or the console and enters a username and password.
  2. The router sends an Access-Request to the first RADIUS server. If the server does not answer, the router tries the next one (up to three servers, in the listed order).
  3. Accept: the administrator is logged in with the privilege the server returned.
  4. Reject: the login is refused. The router does not try the local password, as on Cisco.
  5. No server answers: only the local accounts work (support with its local password), with the message RADIUS servers unreachable, local password in the log.

With the default timeout (3 seconds) and 1 retry, each server takes up to 6 seconds before the next one is tried: up to about 18 seconds with three unreachable servers before the local fallback.

Some account names have fixed rules:

Account Rule
Any RADIUS user Logs in only with a RADIUS Accept
support Local account. Works only when no RADIUS server answers; refused while a server is reachable
root Never logs in, over SSH or the console

Privilege Levels and Enable Mode

The RADIUS server sets the administrator's privilege in the Access-Accept:

Server attribute Privilege In the CLI
Cisco-AVPair = "shell:priv-lvl=15", or Service-Type = Administrative-User 15 (admin) enable enters enable mode directly, without a password
Cisco-AVPair = "shell:priv-lvl=1", Service-Type = NAS-Prompt-User, or no attribute 1 (operator) enable asks for an enable password, checked as set in Enable Password below

GUI Configuration

Tick CLI RADIUS / AAA Login, add the RADIUS servers, then choose the login options.

CLI RADIUS / AAA Login

Step 1: Click Add RADIUS Server, fill in the form, and click Continue. Repeat for up to three servers; they are tried in the listed order.

For RADIUS over UDP (with a shared key):

Add a RADIUS server over UDP

For RadSec (RADIUS over TLS):

Add a RadSec server

Field Example Description
Server 10.1.1.10 IP address or host name of the RADIUS server. Required.
Type RADIUS (UDP, shared key) RADIUS (UDP, shared key): classic RADIUS, works with every server. RadSec (TLS, device certificate): the whole exchange inside TLS, the router authenticated by its certificate.
Port 1812 Authentication port. Empty: 1812 (UDP) or 2083 (RadSec).
Shared Key — UDP only. The RADIUS shared secret, the same as on the server. Required for UDP; no spaces.
Accounting Port 1813 UDP only. Empty: 1813.
Retries 1 UDP only. Retries per server before trying the next (0–5).
Timeout (seconds) 3 Seconds to wait for each answer (1–30).

Step 2: Set the login options.

Field Options (default first) Description
SSH Login RADIUS (local only if no server answers) / Local accounts only Login method for SSH
Console Login RADIUS (local only if no server answers) / Local accounts only Login method for the serial console. Keep it on RADIUS for accountability; the local fallback still works when the network is down.
Enable Password Each user's own enable password (RADIUS) / Shared $enab15$ password (RADIUS) / Local enable password How privilege 1 users are checked when they type enable. See below.
Accounting Send login accounting (start / stop) / No accounting Send an Accounting Start at login and a Stop at logout
Source Interface vlan1 Optional. RADIUS requests are sent from this interface's address, which is the address the RADIUS server knows the router (NAS) by. Empty: the router chooses by its routing table.

Enable Password options:

Option What the router sends Use
Each user's own enable password A second Access-Request for the same user with Service-Type = Administrative-User and NAS-Port-Id = enable. The server checks the user's enable password, not the login password. Personal enable passwords (recommended)
Shared $enab15$ password An Access-Request for the user $enab15$ Cisco convention; one enable password kept on the server (Cisco ISE, Windows NPS)
Local enable password Nothing; the router's local enable password is asked No enable password on the server

When no server answers, the local enable password applies, with the warning No RADIUS server answers: local enable password.

Step 3: Click Save, then Apply Config.

Test before you rely on it

Before you close your current session, open a second SSH session and log in with a RADIUS account. If the login fails, fix the server or untick CLI RADIUS / AAA Login and apply again from the first session. While a RADIUS server is reachable, support is refused, so a wrong server rule can lock out every administrator. mFusion can still remove the setting: untick CLI RADIUS / AAA Login and run Apply Config.

CLI Configuration

system
 aaa radius-server 10.1.1.10 key Example-Key-123
 aaa radius-server radius2.example.com radsec
 aaa authentication ssh radius
 aaa authentication console radius
 aaa enable-authentication radius-user
 aaa accounting enable
 aaa source-interface vlan1
!
Line Effect
aaa radius-server <server> key <key> [auth-port <p>] [acct-port <p>] [retries <n>] [timeout <s>] A RADIUS server over UDP. Up to three; tried in order.
aaa radius-server <server> radsec [port <p>] [timeout <s>] A RadSec server (TLS, default port 2083)
aaa authentication ssh radius\|local SSH login method (local = local accounts only)
aaa authentication console radius\|local Console login method
aaa enable-authentication radius-user\|enab15\|local How privilege 1 users are checked for enable mode
aaa accounting enable\|disable Start/Stop accounting
aaa source-interface <interface> Source address of RADIUS requests

no aaa under system removes RADIUS login: every login uses the local accounts again.

RADIUS Server Setup

Configure the router as a RADIUS client (NAS) on the server, with the same shared key and the router's source address. Then create the administrator accounts.

Message-Authenticator. The router requires the Message-Authenticator attribute in every reply (protection against the BlastRADIUS attack) and treats a reply without it as no answer. Current Cisco ISE and Windows NPS versions send it (check that the BlastRADIUS updates are installed). FreeRADIUS 3.2.1 does not send it in Access-Accept and Access-Reject replies by default; add it in the post-auth section of the site:

post-auth {
    update reply {
        Message-Authenticator := 0x00
    }
    ...
    Post-Auth-Type REJECT {
        update reply {
            Message-Authenticator := 0x00
        }
        ...
    }
}

Accounts (FreeRADIUS users file example). The order matters: enable requests are matched first, so that an enable password is never checked against the login password.

alice     Service-Type == Administrative-User, Cleartext-Password := "<alice enable password>"
"$enab15$" Service-Type == Administrative-User, Cleartext-Password := "<shared enable password>"
DEFAULT   Service-Type == Administrative-User, Auth-Type := Reject
          Reply-Message = "No enable password set for this account"
alice     Cleartext-Password := "<alice login password>"
          Cisco-AVPair = "shell:priv-lvl=1"
bob       Cleartext-Password := "<bob login password>"
          Cisco-AVPair = "shell:priv-lvl=15"
  • alice is an operator (privilege 1) with her own enable password.
  • bob is an administrator (privilege 15) and enters enable mode without a password.
  • The DEFAULT ... Reject line refuses enable for any user without an enable password, with a message the router shows.

On Cisco ISE or Windows NPS, return shell:priv-lvl=<n> as a Cisco vendor-specific attribute (Cisco-AV-Pair) in the network policy or authorization profile for the router.

Accounting. Each login sends an Accounting Start, and each logout a Stop, with User-Name, Acct-Session-Id, Calling-Station-Id (the SSH source address, or console), NAS-Identifier (the router hostname) and the session time.


mFusion as the RADIUS Server

mFusion can be the RADIUS server for the routers it manages. The CLI accounts are then the mFusion administrator accounts: each administrator logs in to the router CLI with the same username and password as to mFusion, and no separate RADIUS server is needed.

mFusion as the server
Accounts ADMIN → Accounts: tick CLI Login: Enable and choose the CLI Options
Password and lockout The account's mFusion password and the mFusion Account Policy
Which routers By default the devices of the account's User Entities; can be limited further
Transport RadSec on TCP 2083, each router identified by a device certificate that mFusion issues automatically
Records ADMIN → Accounts → CLI Logins

On mFusion, run security device-login-server. On the router, the configuration is:

system
 aaa radius-server portal.ransnet.com radsec
 aaa authentication ssh radius
 aaa authentication console radius
 aaa enable-authentication radius-user
 aaa accounting enable
!

For the architecture, the login flow, device certificates, the account options, verification and troubleshooting, see CLI Login to Devices.


Verification

Items to Test Command Expected Outcome
Servers and options show system aaa Each server with its type, port and status; the SSH, console, enable and accounting settings; the active RADIUS sessions with user, source and privilege
A RADIUS account test system aaa alice (enable mode; asks for the password) [info] alice: accept from 10.1.1.10, privilege 1
A wrong password test system aaa alice, wrong password [warn] alice: reject from 10.1.1.10
SSH login ssh alice@<router> Login succeeds; the CLI banner shows alice
Privilege 15 Log in as bob, type enable Enable mode without a password prompt
Privilege 1 Log in as alice, type enable Enter enable password:; her enable password works, her login password does not
support while a server answers ssh support@<router> Refused
Local fallback Block the router's access to all servers, log in as support Login succeeds with the local password after the timeouts
Accounting Check the server's accounting log A Start record at login and a Stop record at logout for alice
Local policy show security login-policy The policy values and the status of the local accounts

Troubleshooting

Symptom Likely Cause Solution
Every RADIUS login fails and support works The server does not answer: wrong address, port blocked, wrong shared key, or no Message-Authenticator in the replies Run show system aaa for the server status. Check the key and the router's address on the server, UDP 1812/1813 in between, and the Message-Authenticator rule above
A login is refused although the password is right The server rejects: the router is not a known client, or the user is not allowed on this NAS Check the server's log for the reject reason; test system aaa <user> shows the server's reply message
support is refused A RADIUS server is reachable, so local accounts are disabled Log in with a RADIUS account; support works again only when no server answers
Login takes about 18 seconds and then falls back to local All servers unreachable Fix connectivity, or remove dead servers; lower Timeout if the network is reliable
enable says No enable password set for this account The server has no enable password for the user Add an enable entry for the user on the server, or choose Local enable password
enable refuses the login password By design: the enable password must be different Use the user's enable password
RadSec server always unreachable No device certificate on the router, a certificate not trusted by the server, or the server name does not match its certificate show system aaa shows the certificate and its expiry date. Check that the server trusts the mFusion device CA and that the configured server name matches the server certificate
Apply Config fails on the aaa lines The router firmware has no system block Untick CLI RADIUS / AAA Login for this router or upgrade the firmware

Best Practices

  • Use two RADIUS servers in different locations so that one failure does not force the local fallback.
  • Give privilege 15 only to administrators who need it. Operators with privilege 1 and a personal enable password leave a clearer audit trail.
  • Keep the local support password strong and in a vault. It is the break-glass account when no server answers.
  • Set a source interface on routers with several WANs or VPNs, so that the server always sees the same router address.
  • Keep accounting on to know who was logged in and when.

Security Best Practices

  • Prefer RadSec where the server supports it: the whole exchange, including user names and attributes, is encrypted, and the router is authenticated by its certificate. With UDP, only the password is hidden.
  • Use long, random shared keys, different for each router group, and never a key with spaces.
  • Do not send RADIUS over the internet unencrypted. Use RadSec, or send UDP RADIUS through a VPN.
  • Remove leavers on the server. The account stops working on all routers at once. With mFusion as the server, disabling the mFusion account is enough.
  • With mFusion as the server, limit CLI access with Allowed Devices, Source Networks and Valid Until, and give Administrator (15) only to those who need it.
  • Reset the device certificate of a router that was lost, stolen or reinstalled.
  • Restrict SSH to management addresses with firewall-input rules. See Device Hardening.