text stringlengths 0 6.55k |
|---|
SW1(config-line)# exit |
! |
! Define the local usernames, just like with Telnet |
! |
SW1(config)# username wendell password odom |
SW1(config)# username chris password youdaman |
SW1(config)# ^Z |
SW1# |
Earlier, I mentioned that one useful default was that the switch defaults to support both SSH and Telnet on the vty lines. However, because Telnet is a security risk, you could disable Telnet to enforce a tighter security policy. (For that matter, you can disable SSH support and allow Telnet on the vty lines as well.) |
To control which protocols a switch supports on its vty lines, use the transport input {all | none | telnet | ssh} vty subcommand in vty mode, with the following options: |
transport input all or transport input telnet ssh: Support both Telnet and SSH transport input none: Support neither |
transport input telnet: Support only Telnet transport input ssh: Support only SSH |
To complete this section about SSH, the following configuration checklist details the steps for one method to configure a Cisco switch to support SSH using local usernames. (SSH support in IOS can be configured in several ways; this checklist shows one simple way to configure it.) The process shown here ends with a com... |
Config Checklist |
Step 1. Configure the switch to generate a matched public and private key pair to use for encryption: |
A. If not already configured, use the hostname name in global configuration mode to configure a hostname for this switch. |
|||||||||||||||||||| Technet24 |
|||||||||||||||||||| |
Chapter 6: Configuring Basic Switch Management 139 |
B. If not already configured, use the ip domain-name name in global configu-ration mode to configure a domain name for the switch, completing the switch’s FQDN. |
C. Use the crypto key generate rsa command in global configuration mode (or the crypto key generate rsa modulus modulus-value command to avoid being prompted for the key modulus) to generate the keys. (Use at least a 768-bit key to support SSH version 2.) |
Step 2. (Optional) Use the ip ssh version 2 command in global configuration mode to override the default of supporting both versions 1 and 2, so that only SSHv2 connections are allowed. |
Step 3. (Optional) If not already configured with the setting you want, configure the vty lines to accept SSH and whether to also allow Telnet: |
A. Use the transport input ssh command in vty line configuration mode to allow SSH only. |
B. Use the transport input all command (default) or transport input telnet ssh |
command in vty line configuration mode to allow both SSH and Telnet. 6 Step 4. Use various commands in vty line configuration mode to configure local user- |
name login authentication as discussed earlier in this chapter. |
NOTE Cisco routers often default to transport input none, so you must add the transport input line subcommand to enable Telnet and/or SSH into a router. |
Two key commands give some information about the status of SSH on the switch. First, the show ip ssh command lists status information about the SSH server itself. The show ssh command then lists information about each SSH client currently connected into the switch. Example 6-6 shows samples of each, with user wendell c... |
Example 6-6 Displaying SSH Status |
SW1# show ip ssh |
SSH Enabled - version 2.0 |
Authentication timeout: 120 secs; Authentication retries: 3 |
SW1# show ssh |
Connection Version Mode Encryption Hmac State Username |
0 2.0 IN |
0 2.0 OUT |
aes126-cbc |
aes126-cbc |
hmac-sha1 |
hmac-sha1 |
Session started |
Session started |
wendell |
wendell |
%No SSHv1 server connections running. |
Enabling IPv4 for Remote Access |
To allow Telnet or SSH access to the switch, and to allow other IP-based management proto-cols (for example, Simple Network Management Protocol, or SNMP) to function as intended, |
|||||||||||||||||||| |
|||||||||||||||||||| |
140 CCNA 200-301 Official Cert Guide, Volume 1 |
the switch needs an IP address, as well as a few other related settings. The IP address has nothing to do with how switches forward Ethernet frames; it simply exists to support over-head management traffic. |
This next topic begins by explaining the IPv4 settings needed on a switch, followed by the configuration. Note that although switches can be configured with IPv6 addresses with commands similar to those shown in this chapter, this chapter focuses solely on IPv4. All ref-erences to IP in this chapter imply IPv4. |
Host and Switch IP Settings |
A switch needs the same kind of IP settings as a PC with a single Ethernet interface. For per-spective, a PC has a CPU, with the operating system running on the CPU. It has an Ethernet network interface card (NIC). The OS configuration includes an IP address associated with the NIC, either configured or learned dynamic... |
A switch uses the same ideas, except that the switch needs to use a virtual NIC inside the switch. Like a PC, a switch has a real CPU, running an OS (called IOS). The switch obviously has lots of Ethernet ports, but instead of assigning its management IP address to any of those ports, the switch then uses a NIC-like co... |
Host Concept Inside Switch |
Other Real Hosts Outside Switch |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.