transport input ssh command. The default is transport input all. SSH requires a local username database, ip domain, and RSA key to be generated. Switch(config)# username Joe password User
Switch(config)# ip domain-name sshtest.lab
Switch(config)# crypto key generate key
Switch(config)# line vty 0 15
Switch(config-line)# login local
Switch(config-line)# transport input ssh Now you will need an application on the workstation that supports SSH, such as SecureCRT or PuTTY.
Content 8.6 Securing Network Switches 8.6.4 vty ACLs Cisco provides ACLs to permit or deny Telnet access to the vty ports of a switch. Cisco devices vary in the number of vty ports that are available by default. When configuring vty ACLs, ensure that all default ports are removed or have a specific vty ACL applied. Telnet filtering is normally considered an extended IP ACL function because it is filtering a higher level protocol. However, because the access-class command filters incoming Telnet sessions by source address and applies filtering to vty lines, you can use standard IP ACL statements to control vty access. The access-class command also applies standard IP ACL filtering to vty lines for outgoing Telnet sessions originating from the switch. You can apply vty ACLs to any combination of vty lines. You can apply the same ACL to all vty lines or specifically to each vty line. The most common practice is to apply the same ACL to all vty lines.
Content 8.6 Securing Network Switches 8.6.5 Applying ACLs to vty Lines To configure vty ACLs on a Cisco switch, create a standard IP ACL and apply it to the vty interfaces. Different from applying an ACL to a data interface, apply it to a vty line or range of lines with the access-class command.Consider this example. Permission is granted to any device on network 192.168.1.0/24 to establish a virtual terminal (Telnet) session with the switch. Of course, the user must know the appropriate passwords to enter user mode and privileged mode. Identical restrictions have been set on every vty line, because the line on which the vty user connects cannot be controlled. The implicit deny any statement at the end of the access list still applies to the ACL when it is used as an access-class entry. Switch(config)# access-list 12 permit 192.168.1.0 0.0.0.255
Switch(config)# line vty 0 15
Switch (config-line)# access-class 12 in Note: The actual number of vty lines depends on the platform and the Cisco IOS software being run.
Content 8.6 Securing Network Switches 8.6.6 Best Practices for Switch Security Network security vulnerabilities include loss of privacy, data theft, impersonation, and loss of integrity. Basic security measures should be taken on every network to mitigate adverse effects of user negligence or acts of malicious intent. The following steps are required whenever placing new equipment in service: Step 1 Consider or establish organizational security policies. Step 2 Secure switch devices. Step 3 Secure switch protocols. Step 4 Mitigate compromises launched through a switch. You should consider the policies of an organization when determining which level and type of security to implement. You must balance the goal of reasonable network security with the administrative overhead of extremely restrictive security measures. A well-established security policy has these characteristics: Follow these best practices for secure switch access: no service tcp-small-servers
no service udp-small-servers
no service finger
no service config
Follow these best practices for switch security :