Cisco Switch enable ssh command

Steven · 2023-03-14 23:05 · 68 views · Cisco · old id 155

  • Configure a hostname for the switch:
Switch# configure terminal

Switch(config)# hostname <hostname>

  • Configure a domain name (optional):

Switch(config)# ip domain-name <domain-name>

  • Generate a crypto key to be used for SSH encryption:

Switch(config)# crypto key generate rsa general-keys modulus 2048

  • Enable SSH on the switch:

Switch(config)# ip ssh version 2

  • Configure the switch to use local usernames and passwords for authentication:

Switch(config)# username <username> privilege 15 secret <password>

  • Configure the VTY lines to use SSH for remote access:

Switch(config)# line vty 0 15

Switch(config-line)# transport input ssh

Switch(config-line)# login local


Once you have completed these steps, you should be able to connect to the switch using an SSH client such as PuTTY. 

When prompted, enter the username and password you configured in step 5.

← Back to home