Managing vty Lines
The system supports 20 virtual tty (vty) lines for Telnet, SSH, and FTP services. Each Telnet, SSH, or FTP session requires one vty line. When you connect to the system via a vty line, the number of the vty line is not assigned sequentially; instead, the system assigns the first vty line that passes the host access list check rules.
Configuring vty Lines
By default five vty lines (0-4) are open. You can open additional lines using the line vty command. Once lines are open, login is enabled by default. Before users can access the lines, you must configure a password, disable login using the no login command, or configure AAA authentication on the lines.
line vty
- Use to open or configure vty lines.
- You can specify a single line or a range of lines. The range is 0-19.
- Example
host1(config)#line vty 6 10host1(config-line)#
- Use the no version to remove a vty line or a range of lines from the configuration. Lines that you remove will no longer be available for use by Telnet, FTP, or SSH. When you remove a vty line, the system removes all lines above that line. For example, no line vty 6 causes the system to remove lines 6 through 19. You cannot remove lines 0 through 4.
password
- Use to specify a password on a single line or a range of lines.
- If you enable login but do not configure a password, the system will not allow you to access virtual terminals.
- Specify a password in plain text (unencrypted) or cipher text (encrypted). In either case, the system stores the password as encrypted.
- You can use the following keywords:
- 0 (zero) - specifies an unencrypted password
- 5 - specifies a secret
- 7 - specifies an encrypted password
host1(config-line)#password 0 mypasswordhost1(config-line)#password 5 y13_xhost1(config-line)#password 7 x13_2For more information about configuring security for vty lines, see Chapter 6, Passwords and Security.
Clearing vty Lines
Use the clear line command to clear a vty line. Using this command terminates any service, such as an FTP session, on this line and closes any open files.
clear line
- Use to remove any services on a vty line and close any files opened as a result of services on that line.
- Specify the number of the vty line.
- Example
host1#clear line 2Monitoring vty Lines
Use the show line vty command to monitor vty lines.
show line vty
- access-class - access-class associated with the vty line
- data-character-bits - number of bits per character
- exec-banner - status for the exec banner: enabled or disabled. This banner is displayed by the CLI after user authentication (if any) and before the first prompt of a CLI session.
- motd-banner - status for the MOTD banner: enabled or disabled. This banner is displayed by the CLI when a connection is initiated.
- login-timeout - time interval during which the user must log in.
host1#show line vty 0no access-class indata-character-bits 8exec-timeout 3w 3d 7h 20m 0sexec-banner enabledmotd-banner enabledlogin-timeout 30 seconds