Setup SSH Access on Cisco Switches

The Cisco Catalyst WS-C3750G-24TS [IOS 12.2(25)SEE3] switch provides both layer 2 and layer 3 functionality. In this lab I’m going to demonstrate how to setup SSH access to the switch. The first thing I do is set a hostname and assign an IP address to an interface:

– enable
conf
hostname Cisco_3570
ip routing
interface gi 1/0/1
no switchport
ip address 10.10.121.140 255.255.255.0
no shut

Now, that I have an IP address setup on a physical interface I need to setup a default route so incoming packets can find their way back via the gateway. Let’s assume I have interface gigabitEthernet 1/0/1 physically connected via ethernet cable to a management switch with a gateway address of 10.10.121.254. The config-mode command to enter the default route would be:

– ip route 0.0.0.0 0.0.0.0 10.10.121.254

To test the setup, from my PC, I ping the IP address (10.10.121.140) I assigned to interface gigabitEthernet 1/0/1. For the final touches to enable SSH to the switch, I set the domain name, generate the encryption keys for securing the session, apply some SSH settings, configure SSH as an access protocol, and enable local authentication on the vty lines:

– enable
conf
ip domain-name HumairAhmed.com
crypto key generate rsa general-keys modulus 1024
ip ssh time-out 60
ip ssh authentication-retries 2
line vty 0 15
transport input ssh
login local

The Cisco Catalyst 3570 switch is now accessible via SSH!

This entry was posted in Cisco, Labs, Networking, Technology and tagged , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


5 × = thirty five