Customizing a cli prompt – Cisco ASA 5505 User Manual

Page 748

Advertising
background image

37-8

Cisco ASA 5500 Series Configuration Guide using the CLI

Chapter 37 Configuring Management Access

Configuring CLI Parameters

To configure a login banner, perform the following steps:

Detailed Steps

Examples

The following example shows how to add a message-of-the-day banner:

hostname(config)# banner motd Welcome to $(hostname).

hostname(config)# banner motd Contact me at [email protected] for any

hostname(config)# banner motd issues.

Customizing a CLI Prompt

The CLI Prompt pane lets you customize the prompt used during CLI sessions. By default, the prompt
shows the hostname of the ASA. In multiple context mode, the prompt also displays the context name.
You can display the following items in the CLI prompt:

Command

Purpose

banner

{exec | login | motd} text

Example:

hostname(config)# banner motd Welcome to

$(hostname).

Adds a banner to display at one of three times: when a user first connects
(message-of-the-day (motd)), when a user logs in (login), and when a user
accesses privileged EXEC mode (exec). When a user connects to the ASA,
the message-of-the-day banner appears first, followed by the login banner
and prompts. After the user successfully logs in to the ASA, the exec
banner appears.

To add more than one line, precede each line by the banner command.

For the banner text:

Spaces are allowed, but tabs cannot be entered using the CLI.

There are no limits for banner length other than those for RAM and
flash memory.

You can dynamically add the hostname or domain name of the ASA by
including the strings $(hostname) and $(domain).

If you configure a banner in the system configuration, you can use that
banner text within a context by using the $(system) string in the
context configuration.

context

(Multiple mode only) Displays the name of the current context.

domain

Displays the domain name.

hostname

Displays the hostname.

Advertising