Setup SSH to Cisco router / switch / ASA

Using your Telnet session or Console session do the following:

cisco(config)# hostname <name>
 cisco(config)# ip domain-name <domain>
 cisco(config)# crypto key generate rsa 2048
 cisco(config)# ip ssh version 2


Now the SSH keys have been generated you can assign SSH to a VTY (Virtual Teminal Lines), I have also set the login to ‘login local’ so make sure you have setup a local user for access.

line vty 0 4
 transport input ssh
 login local



There maybe times when you need to reset the SSH keys, this command will remove the current keys so you can generate new ones

cisco(config)# crypto key zeroize rsa


Leave a Reply

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