Can’t run crypto key generate rsa on Cisco 3750G Switch

By | November 27, 2019

While reconfiguring a Cisco switch 3750G WS-C3750G-24TS-S1U with version 12.0(5.3). When attempting to run “crypto key genearte rsa“, it was failing with below error:

MW-CORE-SW01#conf t
Enter configuration commands, one per line. End with CNTL/Z.
MW-CORE-SW01(config)#hostname MWired
MW-CORE-SW01(config)#ip domain-name magwinya.co.za
MW-CORE-SW01(config)#crypto key generate rsa

% Invalid input detected at ‘^’ marker.

Workaround Solution:

In order to run “crypto key generate rsa”, you need an IOS image that contains “k9” in the name.

In our case we had to upgrade IOS boot image to:

c3750-advipservicesk9-mz.122-46.SE.bin

Follow this upgrade guide: Click HERE

Once upgrade is completed, all was in order.

MW-CORE-SW01(config)#crypto key generate rsa
The name for the keys will be: MW-CORE-SW01.magwinya.co.za
Choose the size of the key modulus in the range of 360 to 4096 for your
General Purpose Keys. Choosing a key modulus greater than 512 may take
a few minutes.

How many bits in the modulus [512]: 1024

All the best!

We by far have the best in class Cisco® Design and Architecture. We take pride in our configs, which works perfect and I can tell you right now; right here; that we lock down your network right to the T. We don’t play games in this space.