Skip to content
Guides & References

IOS-XE management access

Worked examples for the Cisco IOS-XE management access template: SSH version 2, no Telnet, idle timeouts on console and VTY lines, and login banners.

Policy LibraryUpdated
Platform
Cisco IOS-XE
Minimum version
rConfig 8.3.0
Editions
Pro, Vector, Enterprise
On this page

IOS-XE management access

Rules for how people reach the device: SSH only, idle sessions closed, and a warning banner before login. They come from the ios-management-access policy template.

Every example on this page was checked with rConfig Pro's policy engine on

Each of the 14 configs below was run through rConfig Pro’s evaluator with the rule above it, and gave the result shown. The configs are sanitised excerpts of the sample configs that come with the template. A card marked changed has one line edited to show a failure.

All the rules come from ios-management-access.policy in the policy templates (v1.5.0). Import the whole file with Import Templates (see importing a policy template), or copy one rule into your own definition. The Cisco IOS templates page lists the file’s known limitations. Run the rules against show running-config.

Rule Method Since
SSH version 2 must_match_single_string 8.0.0
No Telnet on any line must_not_match_regex 8.0.2
Idle timeout on every VTY line evaluate_block 8.3.0
Idle timeout on the console evaluate_block 8.3.0
MOTD banner must_match_regex 8.0.0
Login banner must_match_regex 8.0.0

SSH version 2

SSH version 1 has known weaknesses and should never be offered. This rule passes when the config has the exact line ip ssh version 2. Without that line, IOS can accept both versions.

Definition
// SSH version 2 is enabled (ip ssh version 2)
#[must_match_single_string]
ip ssh version 2
passPassing config: Hardened Catalyst 9500 sample (IOS-XE 17.9, synthetic)
ip ssh version 2
ip ssh time-out 60
ip ssh authentication-retries 3
ip ssh source-interface Vlan99

Why: The exact line ip ssh version 2 is there.

failFailing config: Hardened Catalyst 9500 sample (IOS-XE 17.9, synthetic), changed: version 1 instead of version 2
ip ssh version 1
ip ssh time-out 60
ip ssh authentication-retries 3
ip ssh source-interface Vlan99

Why: There is no ip ssh version 2 line.

Expected result in rConfig, with this rule as the only rule in a definition:

ConfigRule resultOverall result
Passing configpassPASS
Failing configfailFAIL

Framework mapping. The rule provides evidence towards these controls. It does not certify anything.

Framework Reference
NIST SP 800-53 AC-17
HIPAA (45 CFR) 164.312(a)(1)
ISO/IEC 27001:2022 Annex A A.8.24

Tested with: sample excerpts from IOS-XE 17.9 (synthetic). Minimum rConfig 8.0.0 (must_match_single_string). Editions: Pro, Vector, Enterprise.


No Telnet on any line

Telnet sends logins in clear text. This rule fails if any transport input line allows Telnet, either by name or with all. It uses a regex rather than a single string, so transport input telnet ssh is caught as well.

Definition
// No transport input line permits Telnet (telnet or all)
#[must_not_match_regex]
/^\s*transport input .*\b(telnet|all)\b/m
passPassing config: Hardened Catalyst 9500 sample (IOS-XE 17.9, synthetic)
line vty 0 4
access-class MGMT-ACCESS in vrf-also
exec-timeout 5 0
logging synchronous
transport input ssh
line vty 5 15
access-class MGMT-ACCESS in vrf-also
exec-timeout 5 0
transport input ssh

Why: Both VTY blocks allow SSH only.

failFailing config: Cisco 1921 lab sample (IOS 15.7)
line vty 0 4
password example-vty
login local
transport input telnet ssh

Why: transport input telnet ssh allows Telnet next to SSH.

failFailing config: Hardened Catalyst 9500 sample (IOS-XE 17.9, synthetic), changed: transport input all on the second VTY block
line vty 0 4
exec-timeout 5 0
transport input ssh
line vty 5 15
exec-timeout 5 0
transport input all

Why: all includes Telnet. One bad line block is enough to fail.

Expected result in rConfig, with this rule as the only rule in a definition:

ConfigRule resultOverall result
Passing configpassPASS
Failing config 1failFAIL
Failing config 2failFAIL

Framework mapping. The rule provides evidence towards these controls. It does not certify anything.

Framework Reference
NIST SP 800-53 AC-17
HIPAA (45 CFR) 164.312(a)(1)
ISO/IEC 27001:2022 Annex A A.8.5

Tested with: sample excerpts from IOS 15.7 (lab) and IOS-XE 17.9 (synthetic). Minimum rConfig 8.0.2 (must_not_match_regex). Editions: Pro, Vector, Enterprise.


Idle timeout on every VTY line

An SSH session left open is an open door. This rule checks each line vty block on its own. A block passes with a timeout from 1 to 10 minutes, or with no exec-timeout line at all, because 10 minutes is the IOS default and is not printed.

Definition
// No VTY line block sets an exec-timeout outside 1 to 10 minutes (no line means the 10 0 default)
#[evaluate_block]
scope: ^line vty
not:
regex: '/^\s*exec-timeout (?!(?:[1-9](?: [1-5]?[0-9])?|10(?: 0)?)\s*$)/m'
passPassing config: Hardened Catalyst 9500 sample (IOS-XE 17.9, synthetic)
line vty 0 4
access-class MGMT-ACCESS in vrf-also
exec-timeout 5 0
logging synchronous
transport input ssh
line vty 5 15
access-class MGMT-ACCESS in vrf-also
exec-timeout 5 0
transport input ssh

Why: Both blocks time out after 5 minutes.

passPassing config: Operational standards sample (IOS 15.7, synthetic)
line vty 0 4
login authentication default
transport input ssh

Why: No exec-timeout line means the 10 minute default, which is allowed.

failFailing config: Catalyst 9500 sample (IOS-XE 17.9, synthetic)
line vty 0 4
access-class MGMT-ACCESS in vrf-also
exec-timeout 15 0
logging synchronous
transport input ssh
line vty 5 15
access-class MGMT-ACCESS in vrf-also
exec-timeout 15 0
transport input ssh

Why: 15 minutes is longer than 10. The result names both line vty blocks.

Expected result in rConfig, with this rule as the only rule in a definition:

ConfigRule resultOverall result
Passing config 1passPASS
Passing config 2passPASS
Failing configfailFAIL

Framework mapping. The rule provides evidence towards these controls. It does not certify anything.

Framework Reference
NIST SP 800-53 AC-3
ISO/IEC 27001:2022 Annex A A.8.5

Tested with: sample excerpts from IOS 15.7 (synthetic) and IOS-XE 17.9 (synthetic). Minimum rConfig 8.3.0 (evaluate_block). Editions: Pro, Vector, Enterprise.


Idle timeout on the console

The same check for the console port, which is often forgotten because it needs physical access. exec-timeout 0 0 turns the timeout off, so a logged-in console session stays open for ever. That fails.

Definition
// The console line does not set an exec-timeout outside 1 to 10 minutes (no line means the 10 0 default)
#[evaluate_block]
scope: ^line con
not:
regex: '/^\s*exec-timeout (?!(?:[1-9](?: [1-5]?[0-9])?|10(?: 0)?)\s*$)/m'
passPassing config: Hardened Catalyst 9500 sample (IOS-XE 17.9, synthetic)
line con 0
exec-timeout 5 0
logging synchronous
stopbits 1

Why: The console times out after 5 minutes.

failFailing config: Hardened Catalyst 9500 sample (IOS-XE 17.9, synthetic), changed: exec-timeout 0 0 instead of 5 0
line con 0
exec-timeout 0 0
logging synchronous
stopbits 1

Why: 0 0 means the session never times out.

Expected result in rConfig, with this rule as the only rule in a definition:

ConfigRule resultOverall result
Passing configpassPASS
Failing configfailFAIL

Framework mapping. The rule provides evidence towards these controls. It does not certify anything.

Framework Reference
NIST SP 800-53 AC-3
ISO/IEC 27001:2022 Annex A A.8.5

Tested with: sample excerpts from IOS-XE 17.9 (synthetic). Minimum rConfig 8.3.0 (evaluate_block). Editions: Pro, Vector, Enterprise.


MOTD banner

The message of the day is shown to everyone who connects, before login. Many teams use it for maintenance notices. This rule passes when there is a banner motd line with text after it.

Definition
// A MOTD banner is configured (banner motd)
#[must_match_regex]
/^banner motd .+/m
passPassing config: Hardened Catalyst 9500 sample (IOS-XE 17.9, synthetic)
banner motd ^C
Scheduled maintenance window: Sundays 02:00 to 04:00.
^C

Why: A banner motd line is there.

failFailing config: Catalyst 9500 sample (IOS-XE 17.9, synthetic)
banner exec ^C
Managed by the network operations team.
^C
banner login ^C
Authorised access only. All activity on this device is logged and monitored.
^C

Why: There is an exec banner and a login banner, but no MOTD banner.

Expected result in rConfig, with this rule as the only rule in a definition:

ConfigRule resultOverall result
Passing configpassPASS
Failing configfailFAIL

Framework mapping. The rule provides evidence towards these controls. It does not certify anything.

Framework Reference
ISO/IEC 27001:2022 Annex A A.8.5

Tested with: sample excerpts from IOS-XE 17.9 (synthetic). Minimum rConfig 8.0.0 (must_match_regex). Editions: Pro, Vector, Enterprise.


Login banner

A login banner tells people the device is private and that use is monitored, before they enter a password. Your legal team may want specific text. This rule only checks that a banner login line is there, not what it says.

Definition
// A login banner is configured (banner login)
#[must_match_regex]
/^banner login .+/m
passPassing config: Hardened Catalyst 9500 sample (IOS-XE 17.9, synthetic)
banner login ^C
Authorised access only. All activity on this device is logged and monitored.
Disconnect now if you are not an authorised user.
^C

Why: A banner login line is there.

failFailing config: Hardened Catalyst 9500 sample (IOS-XE 17.9, synthetic), changed: login banner removed
banner motd ^C
Scheduled maintenance window: Sundays 02:00 to 04:00.
^C

Why: Only a MOTD banner. There is no banner login line.

Expected result in rConfig, with this rule as the only rule in a definition:

ConfigRule resultOverall result
Passing configpassPASS
Failing configfailFAIL

Framework mapping. The rule provides evidence towards these controls. It does not certify anything.

Framework Reference
ISO/IEC 27001:2022 Annex A A.8.5

Tested with: sample excerpts from IOS-XE 17.9 (synthetic). Minimum rConfig 8.0.0 (must_match_regex). Editions: Pro, Vector, Enterprise.


Type to search.