Enable SSH Login on a Cisco Router

Quick example of setting up SSH access on a Cisco router. I have a few dozen routers in my lab I’m working on and actually made this scripted. This is here for me to remember in the future.

Router(config)# crypto key generate rsa usage-keys label rtr-key
The name for the keys will be: rtr-key
Choose the size of the key modulus in the range of 360 to 2048 for your
Signature Keys. Choosing a key modulus greater than 512 may take
a few minutes.
How many bits in the modulus [512]: 1024
Choose the size of the key modulus in the range of 360 to 2048 for your
Encryption Keys. Choosing a key modulus greater than 512 may take
a few minutes.
% Generating 1024 bit RSA keys, keys will be non-exportable...[OK]
Router(config)#exit

Check to make sure SSH is now enabled.

Router(config)# do sh ip ssh
SSH Enabled - version 2.0
Authentication timeout: 120 secs; Authentication retries: 3

Configure access now, setting SSH to perferred transport.

Router#conf t
!
line vty 0 4
access-class 1 in
exec-timeout 30 0
privilege level 15
login local
transport preferred ssh
transport input ssh
!

Go play.

Leave a Reply

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