O'Reilly logo

Cisco IOS in a Nutshell, 2nd Edition by James Boney

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

login — line

Synopsis

login [local | tacacs]
no login [login | tacacs]

Configures

The login authentication method for connections

Default

No authentication

Description

This command tells the line to authenticate the user before allowing access. If you give this command without any arguments, you must use the password command to specify a password for this line. The local keyword tells the router to maintain its own database of users, created using the username command. The tacacs keyword tells the router to authenticate users by contacting a TACACS server.

When using login local, make sure you have at least one username configured before you log out. Otherwise, you will be locked out of the specified lines.

Example

To enable simple authentication using a single password for all access through this line:

line vty 0 4
  login
  password letmein

These commands enable authentication using a local database of usernames and user-specific passwords; users Bob, Ann, and John are the only ones able to log into this line.

username bob password letmein
username ann password letmein2
username john password letmein3
line vty 0 4
  login local

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required