Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

login

Syntax

Hierarchy Level

Description

Configure user access to the device.

Options

announcement text

Configure a system login announcement. This announcement appears after a user logs in. Sometimes you want to make announcements to authorized users only after they have logged in. For example, you might want to announce an upcoming maintenance event.

To display a message before the user logs in, configure a system login message using the message statement rather than configuring a system login announcement.

You can format the announcement using the following special characters:

  • \n—New line

  • \t—Horizontal tab

  • \'—Single quotation mark

  • \"—Double quotation mark

  • \\—Backslash

If the text of the announcement contains any spaces, enclose the text in quotation marks.

  • Default: No login announcement is displayed.

deny-sources

(Mandatory) Never allow access from these hosts. The source addresses can be IPv4 or IPv6 addresses, prefix lengths, or hostnames.

  • Syntax: address [source-addresses]

idle-timeout minutes

For a login class, configure the maximum time in minutes that a session can be idle before the session times out and the user is logged out of the device. The session times out after remaining at the CLI operational mode prompt for the specified time.

Note:

After the user logs in to a device from a shell prompt such as csh, if the user starts another program to run in the foreground of the CLI, the idle-timer control is stopped from being computed. The calculation of the idle time of the CLI session is restarted only after the foreground process exits and the control is returned to the shell prompt. When the restart of the idle-timer control occurs, if no interaction from the user occurs on the shell, the user is automatically logged out after the time set on this statement.

  • Default: If you omit this statement, a user is never forced off the system after extended idle times.

  • Range: Range: 0 through 4294967295 minutes

    Note:

    The idle-timeout feature is disabled if the value of minutes is set to 0.

message text

Configure a system login message. A login message displays a banner to users when they access the device, before they log in. To display a message only after the user logs in, configure a system login announcement using the announcement statement instead of configuring a system login message.

Before you create any user accounts, it’s a good idea to configure an initial login message.

You can format the message using the following special characters:

  • \n—New line

  • \t—Horizontal tab

  • \'—Single quotation mark

  • \"—Double quotation mark

  • \\—Backslash

If the text of the message contains any spaces, enclose the text in quotation marks.

  • Default: No login message is displayed.

The remaining statements are explained separately. See CLI Explorer or click a linked statement in the Syntax section for details.

Required Privilege Level

admin—To view this statement in the configuration.

admin-control—To add this statement to the configuration.

Release Information

Statement introduced before Junos OS Release 7.4.

deny-sources option introduced in Junos OS Release 11.2.

All of the statements and options introduced previously were introduced in Junos OS Release 14.1X53-D20 for the OCX Series.